Guosmilesmile commented on code in PR #14191:
URL: https://github.com/apache/iceberg/pull/14191#discussion_r2384436588
##########
flink/v2.1/flink/src/main/java/org/apache/iceberg/flink/sink/dynamic/DynamicSinkUtil.java:
##########
@@ -62,4 +62,14 @@ static int safeAbs(int input) {
return -input;
}
+
+ static int firstPositive(int first, int second) {
+ if (first > 0) {
+ return first;
+ }
Review Comment:
nit: new line.
##########
flink/v2.1/flink/src/main/java/org/apache/iceberg/flink/sink/dynamic/DynamicSinkUtil.java:
##########
@@ -62,4 +62,14 @@ static int safeAbs(int input) {
return -input;
}
+
+ static int firstPositive(int first, int second) {
+ if (first > 0) {
+ return first;
+ }
+ if (second > 0) {
+ return second;
+ }
+ throw new IllegalArgumentException("None of the supplied ints were
positive!");
Review Comment:
Should we print out both values to facilitate troubleshooting?
##########
flink/v2.1/flink/src/main/java/org/apache/iceberg/flink/sink/dynamic/DynamicSinkUtil.java:
##########
@@ -62,4 +62,14 @@ static int safeAbs(int input) {
return -input;
}
+
+ static int firstPositive(int first, int second) {
+ if (first > 0) {
+ return first;
+ }
+ if (second > 0) {
+ return second;
+ }
Review Comment:
nit: new line
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]