This is an automated email from the ASF dual-hosted git repository. jark pushed a commit to branch ci-add-column in repository https://gitbox.apache.org/repos/asf/fluss.git
commit fd79eba430dd01fc07941db2a2d50d22bfc5cbf9 Author: Jark Wu <[email protected]> AuthorDate: Mon Dec 1 20:44:20 2025 +0800 WIP --- .../apache/fluss/record/KvRecordReadContext.java | 1 - .../java/org/apache/fluss/utils/SchemaUtil.java | 27 ---------------------- .../java/org/apache/fluss/row/PaddingRowTest.java | 1 + 3 files changed, 1 insertion(+), 28 deletions(-) diff --git a/fluss-common/src/main/java/org/apache/fluss/record/KvRecordReadContext.java b/fluss-common/src/main/java/org/apache/fluss/record/KvRecordReadContext.java index 195312cef..5fffc3f4f 100644 --- a/fluss-common/src/main/java/org/apache/fluss/record/KvRecordReadContext.java +++ b/fluss-common/src/main/java/org/apache/fluss/record/KvRecordReadContext.java @@ -31,7 +31,6 @@ public class KvRecordReadContext implements KvRecordBatch.ReadContext { private final KvFormat kvFormat; private final SchemaGetter schemaGetter; - // TODO reuse private final Map<Integer, RowDecoder> rowDecoderCache; private KvRecordReadContext(KvFormat kvFormat, SchemaGetter schemaGetter) { diff --git a/fluss-common/src/main/java/org/apache/fluss/utils/SchemaUtil.java b/fluss-common/src/main/java/org/apache/fluss/utils/SchemaUtil.java index 1815e71cd..f10782ea1 100644 --- a/fluss-common/src/main/java/org/apache/fluss/utils/SchemaUtil.java +++ b/fluss-common/src/main/java/org/apache/fluss/utils/SchemaUtil.java @@ -20,7 +20,6 @@ package org.apache.fluss.utils; import org.apache.fluss.exception.SchemaChangeException; import org.apache.fluss.metadata.Schema; -import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -31,32 +30,6 @@ import static org.apache.fluss.row.ProjectedRow.UNEXIST_MAPPING; /** Schema util. */ public class SchemaUtil { - /** - * get the target columns in expected schema. - * - * @param targetColumns - * @param originSchema - * @param expectedSchema - * @return - */ - // TODO - public static int[] getTargetColumns( - int[] targetColumns, Schema originSchema, Schema expectedSchema) { - if (targetColumns == null) { - return null; - } - - // get the mapping from expected schema to origin schema - int[] indexMapping = getIndexMapping(expectedSchema, originSchema); - ArrayList<Integer> targetColumnsInExpectedSchema = new ArrayList<>(); - for (int i = 0; i < targetColumns.length; i++) { - if (indexMapping[targetColumns[i]] != UNEXIST_MAPPING) { - targetColumnsInExpectedSchema.add(indexMapping[targetColumns[i]]); - } - } - return targetColumnsInExpectedSchema.stream().mapToInt(value -> value).toArray(); - } - /** * Get the index mapping from origin schema to expected schema. This mapping can be used to * convert the row with origin schema to the row with expected schema via {@code diff --git a/fluss-common/src/test/java/org/apache/fluss/row/PaddingRowTest.java b/fluss-common/src/test/java/org/apache/fluss/row/PaddingRowTest.java index 392204b87..453f02be3 100644 --- a/fluss-common/src/test/java/org/apache/fluss/row/PaddingRowTest.java +++ b/fluss-common/src/test/java/org/apache/fluss/row/PaddingRowTest.java @@ -21,6 +21,7 @@ import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; +/** Tests for {@link PaddingRow}. */ class PaddingRowTest { @Test
