letian-jiang commented on code in PR #3086:
URL: https://github.com/apache/drill/pull/3086#discussion_r4193016320
##########
logical/src/main/java/org/apache/drill/common/expression/ExpressionStringBuilder.java:
##########
@@ -147,7 +197,16 @@ public Void visitSchemaPath(SchemaPath path, StringBuilder
sb) throws RuntimeExc
@Override
public Void visitLongConstant(LongExpression lExpr, StringBuilder sb) throws
RuntimeException {
- sb.append(lExpr.getLong());
+ if (startBoundLiteral(lExpr, sb)) {
+ return null;
+ }
+ if (lExpr.getDynamicParamIndex() < 0) {
+ // Small BIGINT values otherwise parse back as INT during a plan round
trip.
+ sb.append("cast(").append(lExpr.getLong()).append(" as BIGINT)");
Review Comment:
Thanks for identifying the impact beyond cached plans. I addressed this in
the expression parser: the BIGINT cast emitted when serializing an ordinary
integer literal is now restored as a `LongExpression` during deserialization.
Explicit casts involving parameter slots remain intact.
--
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]