Skip to content

Commit

Permalink
fix default bucket = -1
Browse files Browse the repository at this point in the history
  • Loading branch information
Aitozi committed Oct 12, 2024
1 parent 0d6f57e commit 9c20060
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
import org.apache.paimon.table.sink.InnerTableWrite;
import org.apache.paimon.types.RowType;

import org.apache.paimon.shade.guava30.com.google.common.collect.ImmutableMap;

import java.util.Collections;

/** A simple table test helper to write and commit. */
Expand All @@ -44,7 +46,7 @@ public SimpleTableTestHelper(Path path, RowType rowType) throws Exception {
rowType.getFields(),
Collections.emptyList(),
Collections.singletonList("a"),
Collections.emptyMap(),
ImmutableMap.of("bucket","1"),
""));
FileStoreTable table = FileStoreTableFactory.create(LocalFileIO.create(), path);
String user = "user";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
import org.apache.paimon.types.TimestampType;
import org.apache.paimon.types.VarCharType;

import org.apache.paimon.shade.guava30.com.google.common.collect.ImmutableMap;

import com.facebook.presto.common.type.TimeZoneKey;
import com.facebook.presto.testing.MaterializedResult;
import com.facebook.presto.testing.QueryRunner;
Expand Down Expand Up @@ -143,7 +145,7 @@ protected QueryRunner createQueryRunner() throws Exception {
rowType.getFields(),
Collections.emptyList(),
Collections.singletonList("i"),
new HashMap<>(),
ImmutableMap.of("bucket","1"),
""));
FileStoreTable table = FileStoreTableFactory.create(LocalFileIO.create(), tablePath4);
InnerTableWrite writer = table.newWrite("user");
Expand Down Expand Up @@ -174,7 +176,7 @@ protected QueryRunner createQueryRunner() throws Exception {
rowType.getFields(),
Collections.emptyList(),
Collections.singletonList("ts"),
new HashMap<>(),
ImmutableMap.of("bucket","1"),
""));
FileStoreTable table = FileStoreTableFactory.create(LocalFileIO.create(), tablePath5);
InnerTableWrite writer = table.newWrite("user");
Expand Down Expand Up @@ -204,7 +206,7 @@ protected QueryRunner createQueryRunner() throws Exception {
rowType.getFields(),
Collections.emptyList(),
Arrays.asList("c1", "c2"),
new HashMap<>(),
ImmutableMap.of("bucket","1"),
""));
FileStoreTable table = FileStoreTableFactory.create(LocalFileIO.create(), tablePath5);
InnerTableWrite writer = table.newWrite("user");
Expand Down

0 comments on commit 9c20060

Please sign in to comment.