[GitHub] [flink-table-store] SteNicholas commented on a diff in pull request #395: [FLINK-30125] Projection pushdown is not work for partial update

2022-11-22 Thread GitBox


SteNicholas commented on code in PR #395:
URL: https://github.com/apache/flink-table-store/pull/395#discussion_r1030044691


##
flink-table-store-core/src/main/java/org/apache/flink/table/store/file/mergetree/compact/DeduplicateMergeFunction.java:
##
@@ -48,8 +48,17 @@ public KeyValue getResult() {
 return latestKv;
 }
 
-@Override
-public MergeFunction copy() {
-return new DeduplicateMergeFunction();
+public static MergeFunctionFactory factory() {
+return new Factory();
+}
+
+private static class Factory implements MergeFunctionFactory {
+
+private static final long serialVersionUID = 1L;
+
+@Override
+public MergeFunction create(@Nullable int[][] projection) {
+return new DeduplicateMergeFunction();

Review Comment:
   Does this need to comment for unsupport of the nested projection?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [flink-table-store] SteNicholas commented on a diff in pull request #395: [FLINK-30125] Projection pushdown is not work for partial update

2022-11-22 Thread GitBox


SteNicholas commented on code in PR #395:
URL: https://github.com/apache/flink-table-store/pull/395#discussion_r1030044159


##
flink-table-store-connector/src/test/java/org/apache/flink/table/store/connector/PreAggregationITCase.java:
##
@@ -711,6 +710,10 @@ public void testMergeInMemory() {
 (long) 10101000,
 (float) 0,
 1.11));
+
+// projection
+assertThat(batchSql("SELECT f,e FROM T1"))

Review Comment:
   Does this cover the array and list projection?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [flink-table-store] SteNicholas commented on a diff in pull request #395: [FLINK-30125] Projection pushdown is not work for partial update

2022-11-22 Thread GitBox


SteNicholas commented on code in PR #395:
URL: https://github.com/apache/flink-table-store/pull/395#discussion_r1030043673


##
flink-table-store-connector/src/test/java/org/apache/flink/table/store/connector/PartialUpdateITCase.java:
##
@@ -65,8 +65,10 @@ public void testMergeRead() {
 batchSql("INSERT INTO T VALUES (1, 2, 4, 5, CAST(NULL AS STRING))");
 batchSql("INSERT INTO T VALUES (1, 2, 4, CAST(NULL AS INT), '6')");
 
-List result = batchSql("SELECT * FROM T");
-assertThat(result).containsExactlyInAnyOrder(Row.of(1, 2, 4, 5, "6"));
+assertThat(batchSql("SELECT * FROM 
T")).containsExactlyInAnyOrder(Row.of(1, 2, 4, 5, "6"));
+
+// projection
+assertThat(batchSql("SELECT a FROM 
T")).containsExactlyInAnyOrder(Row.of(4));

Review Comment:
   Does this cover the array and list projection?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org