You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/08/18 23:17:39 UTC
[GitHub] [iceberg] aokolnychyi commented on a diff in pull request #5574: Spark 3.2: Align formatting in bucket and truncate functions
aokolnychyi commented on code in PR #5574:
URL: https://github.com/apache/iceberg/pull/5574#discussion_r949674800
##########
spark/v3.2/spark/src/main/java/org/apache/iceberg/spark/functions/BucketFunction.java:
##########
@@ -226,9 +231,11 @@ public String canonicalName() {
@Override
public Integer produceResult(InternalRow input) {
- return input.isNullAt(NUM_BUCKETS_ORDINAL) || input.isNullAt(VALUE_ORDINAL)
- ? null
- : invoke(input.getInt(NUM_BUCKETS_ORDINAL), input.getUTF8String(VALUE_ORDINAL));
+ if (input.isNullAt(NUM_BUCKETS_ORDINAL) || input.isNullAt(VALUE_ORDINAL)) {
+ return null;
+ } else {
+ return invoke(input.getInt(NUM_BUCKETS_ORDINAL), input.getInt(VALUE_ORDINAL));
Review Comment:
Looks like a typo. Shall it still be `input.getUTF8String()`?
--
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