kbendick commented on a change in pull request #2082:
URL: https://github.com/apache/iceberg/pull/2082#discussion_r556265014



##########
File path: flink/src/main/java/org/apache/iceberg/flink/FlinkCatalog.java
##########
@@ -655,10 +685,54 @@ public void alterPartitionColumnStatistics(ObjectPath 
tablePath, CatalogPartitio
     return Lists.newArrayList(set);
   }
 
-  @Override
-  public List<CatalogPartitionSpec> listPartitions(ObjectPath tablePath, 
CatalogPartitionSpec partitionSpec)
-      throws CatalogException {
-    throw new UnsupportedOperationException();
+  private String getValue(Schema schema, String name, int index, StructLike 
structLike) {
+    Type type = schema.findType(name);
+    if (type instanceof Types.DateType) {
+      return DateTimeUtil.dateFromDays(structLike.get(index, 
Integer.class)).toString();
+    } else if (type instanceof Types.TimeType) {
+      return DateTimeUtil.timeFromMicros(structLike.get(index, 
Long.class)).toString();
+    } else if (type instanceof Types.TimestampType) {
+      return DateTimeUtil.timestampFromMicros(structLike.get(index, 
Long.class)).toString();
+    } else {
+      return String.valueOf(structLike.get(index, Object.class));
+    }
+  }
+
+  private org.apache.iceberg.expressions.Expression getPartitionFilter(Schema 
schema,

Review comment:
       Nit: It seems that the currently imported 
`org.apache.flink.table.expressions.Expression` is only used one time. It would 
possibly make sense to import `org.apache.iceberg.expressions.Expression` 
instead and then use the fully qualified name for the location where 
`org.apache.flink.table.expressions.Expression` is used.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to