This is an automated email from the ASF dual-hosted git repository.
ahmedabu98 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new c4a064789f5 Fix cdc coder test (#40015)
c4a064789f5 is described below
commit c4a064789f5c40c93f07e2d18ed9d77721b56b01
Author: Ahmed Abualsaud <[email protected]>
AuthorDate: Fri Sep 4 13:31:04 2026 +0200
Fix cdc coder test (#40015)
---
sdks/java/io/iceberg/build.gradle | 1 -
.../beam/sdk/io/iceberg/cdc/sink/CdcRecordCoderTest.java | 12 ++++++------
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/sdks/java/io/iceberg/build.gradle
b/sdks/java/io/iceberg/build.gradle
index 7340d1eeb41..e2e8a12d01e 100644
--- a/sdks/java/io/iceberg/build.gradle
+++ b/sdks/java/io/iceberg/build.gradle
@@ -49,7 +49,6 @@ dependencies {
implementation library.java.avro
implementation library.java.slf4j_api
implementation library.java.joda_time
- implementation library.java.guava
implementation "org.apache.parquet:parquet-column:$parquet_version"
implementation "org.apache.parquet:parquet-hadoop:$parquet_version"
implementation "org.apache.parquet:parquet-common:$parquet_version"
diff --git
a/sdks/java/io/iceberg/src/test/java/org/apache/beam/sdk/io/iceberg/cdc/sink/CdcRecordCoderTest.java
b/sdks/java/io/iceberg/src/test/java/org/apache/beam/sdk/io/iceberg/cdc/sink/CdcRecordCoderTest.java
index a53b98a10aa..df38787bb31 100644
---
a/sdks/java/io/iceberg/src/test/java/org/apache/beam/sdk/io/iceberg/cdc/sink/CdcRecordCoderTest.java
+++
b/sdks/java/io/iceberg/src/test/java/org/apache/beam/sdk/io/iceberg/cdc/sink/CdcRecordCoderTest.java
@@ -82,10 +82,10 @@ public class CdcRecordCoderTest {
RowCoder.of(DATA_SCHEMA).encode(row, rowOnly);
int rowLen = rowOnly.toByteArray().length;
- assertPinnedKindCode(row, ValueKind.INSERT, rowLen, 0);
- assertPinnedKindCode(row, ValueKind.UPDATE_BEFORE, rowLen, 1);
- assertPinnedKindCode(row, ValueKind.UPDATE_AFTER, rowLen, 2);
- assertPinnedKindCode(row, ValueKind.DELETE, rowLen, 3);
+ assertPinnedKindCode(row, ValueKind.INSERT, rowLen, 1);
+ assertPinnedKindCode(row, ValueKind.UPDATE_BEFORE, rowLen, 2);
+ assertPinnedKindCode(row, ValueKind.UPDATE_AFTER, rowLen, 3);
+ assertPinnedKindCode(row, ValueKind.DELETE, rowLen, 4);
}
private static void assertPinnedKindCode(Row row, ValueKind kind, int
rowLen, int expectedCode)
@@ -98,12 +98,12 @@ public class CdcRecordCoderTest {
@Test
public void decodeRejectsUnknownKindCode() throws Exception {
- // Hand-encode a stream with a valid data row and seq, but a ValueKind
code (4) at the pinned
+ // Hand-encode a stream with a valid data row and seq, but a ValueKind
code (5) at the pinned
// mapping's boundary: one past the highest valid code (3).
ByteArrayOutputStream out = new ByteArrayOutputStream();
RowCoder.of(DATA_SCHEMA)
.encode(Row.withSchema(DATA_SCHEMA).addValues(1, "a", "x").build(),
out);
- VarIntCoder.of().encode(4, out);
+ VarIntCoder.of().encode(5, out);
VarLongCoder.of().encode(1L, out);
CdcRecordCoder coder = CdcRecordCoder.of(DATA_SCHEMA);