You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "yegangy0718 (via GitHub)" <gi...@apache.org> on 2023/05/09 06:16:36 UTC

[GitHub] [iceberg] yegangy0718 commented on a diff in pull request #7494: Flink: change sink shuffle to use RowData as data type and statistics key type

yegangy0718 commented on code in PR #7494:
URL: https://github.com/apache/iceberg/pull/7494#discussion_r1188139904


##########
flink/v1.17/flink/src/main/java/org/apache/iceberg/flink/sink/shuffle/DataStatisticsOperator.java:
##########
@@ -132,19 +130,19 @@ public void snapshotState(StateSnapshotContext context) throws Exception {
 
     // For now, we make it simple to send globalStatisticsState at checkpoint
     operatorEventGateway.sendEventToCoordinator(
-        new DataStatisticsEvent<>(checkpointId, localStatistics));
+        new DataStatisticsEvent(checkpointId, localStatistics));
 
     // Recreate the local statistics
-    localStatistics = statisticsFactory.createDataStatistics();
+    localStatistics = statisticsSerializer.createInstance();
   }
 
   @VisibleForTesting
-  DataStatistics<K> localDataStatistics() {
+  DataStatistics localDataStatistics() {
     return localStatistics;
   }
 
   @VisibleForTesting
-  DataStatistics<K> globalDataStatistics() {
+  DataStatistics globalDataStatistics() {

Review Comment:
   <img width="562" alt="Screenshot 2023-05-08 at 10 13 38 PM" src="https://user-images.githubusercontent.com/8229749/237000080-a0cb6b7e-031d-4c4b-a3ec-b5b7327172b5.png">
   
   IDE shows warning for raw use of parameterized class 'DataStatistics' , shall we make the return type `DataStatistics<D, S>`



-- 
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-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org