-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use enhanced switch #21578
Use enhanced switch #21578
Conversation
case LOOKUP_SOURCE_BUILT -> lookupSourceNotNeeded.orElseThrow(() -> new IllegalStateException("Lookup source built, but disposal future not set")); | ||
case INPUT_SPILLED -> spilledLookupSourceHandle.getUnspillingOrDisposeRequested(); | ||
case INPUT_UNSPILLING -> unspillInProgress.map(HashBuilderOperator::asVoid) | ||
.orElseThrow(() -> new IllegalStateException("Unspilling in progress, but unspilling future not set")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move to previous line
case AND: | ||
case OR: | ||
case COALESCE: | ||
// All the arguments after the first one are assumed to be conditionally evaluated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
redundant comment
case BETWEEN: | ||
generator = new BetweenCodeGenerator(specialForm); | ||
break; | ||
new SwitchCodeGenerator(specialForm); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move comment above
return DoubleOperators.castToVarchar(UNBOUNDED_LENGTH, parser.getDoubleValue()); | ||
case VALUE_NUMBER_INT: | ||
DoubleOperators.castToVarchar(UNBOUNDED_LENGTH, parser.getDoubleValue()); | ||
case VALUE_NUMBER_INT -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move comment above
default: | ||
throw new JsonCastException(format("Unexpected token when cast to %s: %s", StandardTypes.REAL, parser.getText())); | ||
} | ||
(long) floatToRawIntBits(parser.getFloatValue()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move comment above
// org.apache.hadoop.hive.ql.exec.Utilities.getBucketingVersion is more permissive and treats any non-number as "1" | ||
throw new TrinoException(StandardErrorCode.NOT_SUPPORTED, format("Unsupported bucketing version: '%s'", bucketingVersion)); | ||
} | ||
// org.apache.hadoop.hive.ql.exec.Utilities.getBucketingVersion is more permissive and treats any non-number as "1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move above default
case DESC_NULLS_LAST: | ||
return switch (sortItem.sortOrder()) { | ||
// In MariaDB ASC implies NULLS FIRST | ||
case ASC_NULLS_FIRST, DESC_NULLS_LAST -> | ||
// In MariaDB DESC implies NULLS LAST |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merge two comments
0141df9
to
9e11d12
Compare
9e11d12
to
a6aa76e
Compare
@findepi it's green after rebasing :) Please review |
No description provided.