Skip to content

Commit

Permalink
Fix compilation issues caused by last merge
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-lsembera committed Nov 5, 2024
1 parent db35d5c commit 686ffc8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -495,13 +495,6 @@ && shouldStopProcessing(
blobPath.fileRegistrationPath, this.owningClient.flushLatency.time());
}

// Copy encryptionKeysPerTable from owning client
Map<FullyQualifiedTableName, EncryptionKey> encryptionKeysPerTable =
new ConcurrentHashMap<>();
this.owningClient
.getEncryptionKeysPerTable()
.forEach((k, v) -> encryptionKeysPerTable.put(k, new EncryptionKey(v)));

// Copy encryptionKeysPerTable from owning client
Map<FullyQualifiedTableName, EncryptionKey> encryptionKeysPerTable =
new ConcurrentHashMap<>();
Expand Down Expand Up @@ -619,7 +612,8 @@ BlobMetadata buildAndUpload(
blobPath.fileRegistrationPath,
blobData,
bdecVersion,
this.owningClient.getInternalParameterProvider(), encryptionKeysPerTable);
this.owningClient.getInternalParameterProvider(),
encryptionKeysPerTable);

blob.blobStats.setBuildDurationMs(buildContext);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,17 @@ public void testSerializationErrors() throws Exception {
"a.bdec",
Collections.singletonList(createChannelDataPerTable(1)),
Constants.BdecVersion.THREE,
new InternalParameterProvider(enableIcebergStreaming), encryptionKeysPerTable);
new InternalParameterProvider(enableIcebergStreaming),
encryptionKeysPerTable);

// Construction fails if metadata contains 0 rows and data 1 row
try {
BlobBuilder.constructBlobAndMetadata(
"a.bdec",
Collections.singletonList(createChannelDataPerTable(0)),
Constants.BdecVersion.THREE,
new InternalParameterProvider(enableIcebergStreaming), encryptionKeysPerTable);
new InternalParameterProvider(enableIcebergStreaming),
encryptionKeysPerTable);
} catch (SFException e) {
Assert.assertEquals(ErrorCode.INTERNAL_ERROR.getMessageCode(), e.getVendorCode());
Assert.assertTrue(e.getMessage().contains("parquetTotalRowsInFooter=1"));
Expand All @@ -91,7 +93,8 @@ public void testMetadataAndExtendedMetadataSize() throws Exception {
"a.parquet",
Collections.singletonList(createChannelDataPerTable(1)),
Constants.BdecVersion.THREE,
new InternalParameterProvider(enableIcebergStreaming));
new InternalParameterProvider(enableIcebergStreaming),
new ConcurrentHashMap<>());

InputFile blobInputFile = new InMemoryInputFile(blob.blobBytes);
ParquetFileReader reader = ParquetFileReader.open(blobInputFile);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ private abstract static class TestContext<T> implements AutoCloseable {
.thenAnswer((Answer<ParameterProvider>) (i) -> parameterProvider);

encryptionKeysPerTable = new ConcurrentHashMap<>();
if (isIcebergMode) {
if (enableIcebergStreaming) {
encryptionKeysPerTable.put(
new FullyQualifiedTableName("db1", "schema1", "table1"),
new EncryptionKey("db1", "schema1", "table1", "key1", 1234L));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,7 @@ public void testGetLatestCommittedOffsetToken() {
@Test
public void testOpenChannelWithEncryptionKey() throws Exception {
// TODO: SNOW-1490151 Iceberg testing gaps
if (isIcebergMode) {
if (enableIcebergStreaming) {
return;
}

Expand Down

0 comments on commit 686ffc8

Please sign in to comment.