This is an automated email from the ASF dual-hosted git repository.
lzljs3620320 pushed a commit to branch release-0.3
in repository https://gitbox.apache.org/repos/asf/flink-table-store.git
The following commit(s) were added to refs/heads/release-0.3 by this push:
new 95a57666 [hotfix] Fix
ChangelogWithKeyFileStoreTableTest#testAggMergeFunc
95a57666 is described below
commit 95a5766609631fd7e9ff0b2e33b843224ad8d105
Author: tsreaper <[email protected]>
AuthorDate: Fri Mar 3 12:14:13 2023 +0800
[hotfix] Fix ChangelogWithKeyFileStoreTableTest#testAggMergeFunc
This closes #573
---
.../table/store/table/ChangelogWithKeyFileStoreTableTest.java | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git
a/flink-table-store-core/src/test/java/org/apache/flink/table/store/table/ChangelogWithKeyFileStoreTableTest.java
b/flink-table-store-core/src/test/java/org/apache/flink/table/store/table/ChangelogWithKeyFileStoreTableTest.java
index 2f65c059..3e921030 100644
---
a/flink-table-store-core/src/test/java/org/apache/flink/table/store/table/ChangelogWithKeyFileStoreTableTest.java
+++
b/flink-table-store-core/src/test/java/org/apache/flink/table/store/table/ChangelogWithKeyFileStoreTableTest.java
@@ -49,6 +49,7 @@ import
org.apache.flink.table.store.table.system.AuditLogTable;
import org.apache.flink.table.store.utils.CompatibilityTestUtils;
import org.apache.flink.table.types.logical.LogicalType;
import org.apache.flink.table.types.logical.RowType;
+import org.apache.flink.table.types.utils.LogicalTypeDataTypeConverter;
import org.apache.flink.types.RowKind;
import org.apache.flink.util.function.FunctionWithException;
@@ -62,7 +63,6 @@ import java.util.Map;
import java.util.function.Consumer;
import java.util.function.Function;
-import static org.apache.flink.table.store.file.KeyValue.rowDataToString;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
@@ -718,7 +718,10 @@ public class ChangelogWithKeyFileStoreTableTest extends
FileStoreTableTestBase {
options.setString("fields.c.ignore-retract",
"true");
},
rowType);
- Function<RowData, String> rowToString = row -> rowDataToString(row,
rowType);
+ RowRowConverter converter =
+
RowRowConverter.create(LogicalTypeDataTypeConverter.toDataType(rowType));
+ Function<RowData, String> rowDataToString = row ->
converter.toExternal(row).toString();
+
DataTableScan scan = table.newScan();
TableRead read = table.newRead();
TableWrite write = table.newWrite("");
@@ -730,7 +733,7 @@ public class ChangelogWithKeyFileStoreTableTest extends
FileStoreTableTestBase {
write.write(GenericRowData.of(1, 1, 2, 2));
commit.commit(0, write.prepareCommit(true, 0));
- List<String> result = getResult(read, scan.plan().splits(),
rowToString);
+ List<String> result = getResult(read, scan.plan().splits(),
rowDataToString);
assertThat(result).containsExactlyInAnyOrder("+I[1, 1, 6, 3]");
// 2. Retracts
@@ -739,7 +742,7 @@ public class ChangelogWithKeyFileStoreTableTest extends
FileStoreTableTestBase {
write.write(GenericRowData.ofKind(RowKind.DELETE, 1, 1, 1, 1));
commit.commit(1, write.prepareCommit(true, 1));
- result = getResult(read, scan.plan().splits(), rowToString);
+ result = getResult(read, scan.plan().splits(), rowDataToString);
assertThat(result).containsExactlyInAnyOrder("+I[1, 1, 2, 3]");
}