huaxingao commented on code in PR #13166:
URL: https://github.com/apache/iceberg/pull/13166#discussion_r2118341124


##########
spark/v4.0/spark/src/main/java/org/apache/iceberg/spark/functions/HoursFunction.java:
##########
@@ -57,7 +60,19 @@ public String name() {
     return "hours";
   }
 
-  public static class TimestampToHoursFunction extends 
BaseScalarFunction<Integer> {
+  public abstract static class BaseToHourFunction extends 
BaseScalarFunction<Integer>
+      implements ReducibleFunction<Integer, Integer> {
+    @Override
+    public Reducer<Integer, Integer> reducer(ReducibleFunction<?, ?> 
otherBucketFunction) {
+
+      if (otherBucketFunction instanceof DaysFunction.BaseToDaysFunction) {
+        return new HourToDaysReducer();
+      }

Review Comment:
   Nit: add a blank line in between? We normally include an empty line after 
control structures for readability.



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

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


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

Reply via email to