Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,9 @@ public IcebergTableHandle getTableHandle(
table.location(),
table.properties(),
NO_RETRIES,
ImmutableList.of());
ImmutableList.of(),
false,
Optional.empty());
}

@Override
Expand Down Expand Up @@ -1716,7 +1718,8 @@ public Optional<ConstraintApplicationResult<ConnectorTableHandle>> applyFilter(C
}

return Optional.of(new ConstraintApplicationResult<>(
new IcebergTableHandle(table.getSchemaName(),
new IcebergTableHandle(
table.getSchemaName(),
table.getTableName(),
table.getTableType(),
table.getSnapshotId(),
Expand All @@ -1730,7 +1733,9 @@ public Optional<ConstraintApplicationResult<ConnectorTableHandle>> applyFilter(C
table.getTableLocation(),
table.getStorageProperties(),
table.getRetryMode(),
table.getUpdatedColumns()),
table.getUpdatedColumns(),
table.isRecordScannedFiles(),
table.getMaxScannedFileSize()),
remainingConstraint.transformKeys(ColumnHandle.class::cast),
false));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public class IcebergTableHandle
private final Optional<DataSize> maxScannedFileSize;

@JsonCreator
public IcebergTableHandle(
public static IcebergTableHandle fromJsonForDeserializationOnly(
@JsonProperty("schemaName") String schemaName,
@JsonProperty("tableName") String tableName,
@JsonProperty("tableType") TableType tableType,
Expand All @@ -82,7 +82,7 @@ public IcebergTableHandle(
@JsonProperty("retryMode") RetryMode retryMode,
@JsonProperty("updatedColumns") List<IcebergColumnHandle> updatedColumns)
{
this(
return new IcebergTableHandle(
schemaName,
tableName,
tableType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,9 @@ private static ConnectorPageSource createTestingPageSource(HiveTransactionHandle
outputFile.getParentFile().getAbsolutePath(),
ImmutableMap.of(),
RetryMode.NO_RETRIES,
ImmutableList.of()),
ImmutableList.of(),
false,
Optional.empty()),
transaction);

FileFormatDataSourceStats stats = new FileFormatDataSourceStats();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,11 @@ public void testIncompleteDynamicFilterTimeout()
nationTable.location(),
nationTable.properties(),
NO_RETRIES,
ImmutableList.of());
ImmutableList.of(),
false,
Optional.empty());

IcebergSplitSource splitSource = new IcebergSplitSource(
try (IcebergSplitSource splitSource = new IcebergSplitSource(
tableHandle,
nationTable.newScan(),
Optional.empty(),
Expand Down Expand Up @@ -186,21 +188,21 @@ public TupleDomain<ColumnHandle> getCurrentPredicate()
alwaysTrue(),
new TestingTypeManager(),
false,
new IcebergConfig().getMinimumAssignedSplitWeight());

ImmutableList.Builder<IcebergSplit> splits = ImmutableList.builder();
while (!splitSource.isFinished()) {
splitSource.getNextBatch(null, 100).get()
.getSplits()
.stream()
.map(IcebergSplit.class::cast)
.forEach(splits::add);
new IcebergConfig().getMinimumAssignedSplitWeight())) {
ImmutableList.Builder<IcebergSplit> splits = ImmutableList.builder();
while (!splitSource.isFinished()) {
splitSource.getNextBatch(null, 100).get()
.getSplits()
.stream()
.map(IcebergSplit.class::cast)
.forEach(splits::add);
}
assertThat(splits.build().size()).isGreaterThan(0);
assertTrue(splitSource.isFinished());
assertThat(System.currentTimeMillis() - startMillis)
.as("IcebergSplitSource failed to wait for dynamicFilteringWaitTimeout")
.isGreaterThanOrEqualTo(2000);
}
assertThat(splits.build().size()).isGreaterThan(0);
assertTrue(splitSource.isFinished());
assertThat(System.currentTimeMillis() - startMillis)
.as("IcebergSplitSource failed to wait for dynamicFilteringWaitTimeout")
.isGreaterThanOrEqualTo(2000);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,24 @@ public void testProjectionPushdown()
BIGINT,
Optional.empty());

IcebergTableHandle icebergTable = new IcebergTableHandle(SCHEMA_NAME, tableName, DATA, Optional.of(1L), "", "", 1,
TupleDomain.all(), TupleDomain.all(), ImmutableSet.of(), Optional.empty(), "", ImmutableMap.of(), NO_RETRIES, ImmutableList.of());
IcebergTableHandle icebergTable = new IcebergTableHandle(
SCHEMA_NAME,
tableName,
DATA,
Optional.of(1L),
"",
"",
1,
TupleDomain.all(),
TupleDomain.all(),
ImmutableSet.of(),
Optional.empty(),
"",
ImmutableMap.of(),
NO_RETRIES,
ImmutableList.of(),
false,
Optional.empty());
TableHandle table = new TableHandle(new CatalogName(ICEBERG_CATALOG_NAME), icebergTable, new HiveTransactionHandle(false));

IcebergColumnHandle fullColumn = partialColumn.getBaseColumn();
Expand Down Expand Up @@ -230,8 +246,24 @@ public void testPredicatePushdown()

PushPredicateIntoTableScan pushPredicateIntoTableScan = new PushPredicateIntoTableScan(tester().getPlannerContext(), tester().getTypeAnalyzer());

IcebergTableHandle icebergTable = new IcebergTableHandle(SCHEMA_NAME, tableName, DATA, Optional.of(1L), "", "", 1,
TupleDomain.all(), TupleDomain.all(), ImmutableSet.of(), Optional.empty(), "", ImmutableMap.of(), NO_RETRIES, ImmutableList.of());
IcebergTableHandle icebergTable = new IcebergTableHandle(
SCHEMA_NAME,
tableName,
DATA,
Optional.of(1L),
"",
"",
1,
TupleDomain.all(),
TupleDomain.all(),
ImmutableSet.of(),
Optional.empty(),
"",
ImmutableMap.of(),
NO_RETRIES,
ImmutableList.of(),
false,
Optional.empty());
TableHandle table = new TableHandle(new CatalogName(ICEBERG_CATALOG_NAME), icebergTable, new HiveTransactionHandle(false));

IcebergColumnHandle column = new IcebergColumnHandle(primitiveColumnIdentity(1, "a"), INTEGER, ImmutableList.of(), INTEGER, Optional.empty());
Expand Down Expand Up @@ -263,8 +295,24 @@ public void testColumnPruningProjectionPushdown()

PruneTableScanColumns pruneTableScanColumns = new PruneTableScanColumns(tester().getMetadata());

IcebergTableHandle icebergTable = new IcebergTableHandle(SCHEMA_NAME, tableName, DATA, Optional.empty(), "", "", 1,
TupleDomain.all(), TupleDomain.all(), ImmutableSet.of(), Optional.empty(), "", ImmutableMap.of(), NO_RETRIES, ImmutableList.of());
IcebergTableHandle icebergTable = new IcebergTableHandle(
SCHEMA_NAME,
tableName,
DATA,
Optional.empty(),
"",
"",
1,
TupleDomain.all(),
TupleDomain.all(),
ImmutableSet.of(),
Optional.empty(),
"",
ImmutableMap.of(),
NO_RETRIES,
ImmutableList.of(),
false,
Optional.empty());
TableHandle table = new TableHandle(new CatalogName(ICEBERG_CATALOG_NAME), icebergTable, new HiveTransactionHandle(false));

IcebergColumnHandle columnA = new IcebergColumnHandle(primitiveColumnIdentity(0, "a"), INTEGER, ImmutableList.of(), INTEGER, Optional.empty());
Expand Down Expand Up @@ -307,8 +355,24 @@ public void testPushdownWithDuplicateExpressions()
tester().getTypeAnalyzer(),
new ScalarStatsCalculator(tester().getPlannerContext(), tester().getTypeAnalyzer()));

IcebergTableHandle icebergTable = new IcebergTableHandle(SCHEMA_NAME, tableName, DATA, Optional.of(1L), "", "", 1,
TupleDomain.all(), TupleDomain.all(), ImmutableSet.of(), Optional.empty(), "", ImmutableMap.of(), NO_RETRIES, ImmutableList.of());
IcebergTableHandle icebergTable = new IcebergTableHandle(
SCHEMA_NAME,
tableName,
DATA,
Optional.of(1L),
"",
"",
1,
TupleDomain.all(),
TupleDomain.all(),
ImmutableSet.of(),
Optional.empty(),
"",
ImmutableMap.of(),
NO_RETRIES,
ImmutableList.of(),
false,
Optional.empty());
TableHandle table = new TableHandle(new CatalogName(ICEBERG_CATALOG_NAME), icebergTable, new HiveTransactionHandle(false));

IcebergColumnHandle bigintColumn = new IcebergColumnHandle(primitiveColumnIdentity(1, "just_bigint"), BIGINT, ImmutableList.of(), BIGINT, Optional.empty());
Expand Down