Skip to content

Commit

Permalink
post merge
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-alhuang committed Jul 11, 2024
1 parent e3f9d65 commit 6eb0fff
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ List<ChannelStatusRequestDTO> getChannels() {
@Override
public String getStringForLogging() {
return String.format(
"ChannelsStatusRequest(requestId=%s, role=%s, channels=[%s])",
requestId,
"ChannelsStatusRequest(role=%s, channels=[%s])",
role,
channels.stream()
.map(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/*
* Copyright (c) 2024 Snowflake Computing Inc. All rights reserved.
*/

package net.snowflake.ingest.streaming.internal;

import java.io.ByteArrayOutputStream;
Expand All @@ -23,18 +27,21 @@ public void testSerializationErrors() throws Exception {
BlobBuilder.constructBlobAndMetadata(
"a.bdec",
Collections.singletonList(createChannelDataPerTable(1, false)),
Constants.BdecVersion.THREE);
Constants.BdecVersion.THREE,
true);
BlobBuilder.constructBlobAndMetadata(
"a.bdec",
Collections.singletonList(createChannelDataPerTable(1, true)),
Constants.BdecVersion.THREE);
Constants.BdecVersion.THREE,
true);

// Construction fails if metadata contains 0 rows and data 1 row
try {
BlobBuilder.constructBlobAndMetadata(
"a.bdec",
Collections.singletonList(createChannelDataPerTable(0, false)),
Constants.BdecVersion.THREE);
Constants.BdecVersion.THREE,
true);
Assert.fail("Should not pass enableParquetInternalBuffering=false");
} catch (SFException e) {
Assert.assertEquals(ErrorCode.INTERNAL_ERROR.getMessageCode(), e.getVendorCode());
Expand All @@ -52,7 +59,8 @@ public void testSerializationErrors() throws Exception {
BlobBuilder.constructBlobAndMetadata(
"a.bdec",
Collections.singletonList(createChannelDataPerTable(0, true)),
Constants.BdecVersion.THREE);
Constants.BdecVersion.THREE,
true);
Assert.fail("Should not pass enableParquetInternalBuffering=true");
} catch (SFException e) {
Assert.assertEquals(ErrorCode.INTERNAL_ERROR.getMessageCode(), e.getVendorCode());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/*
* Copyright (c) 2024 Snowflake Computing Inc. All rights reserved.
*/

package net.snowflake.ingest.streaming.internal;

import static java.time.ZoneOffset.UTC;
Expand Down Expand Up @@ -36,7 +40,7 @@ public class InsertRowsBenchmarkTest {

@Setup(Level.Trial)
public void setUpBeforeAll() {
client = new SnowflakeStreamingIngestClientInternal<ParquetChunkData>("client_PARQUET");
client = new SnowflakeStreamingIngestClientInternal<ParquetChunkData>("client_PARQUET", false);
channel =
new SnowflakeStreamingIngestChannelInternal<>(
"channel",
Expand Down

0 comments on commit 6eb0fff

Please sign in to comment.