tanclary commented on code in PR #3206:
URL: https://github.com/apache/calcite/pull/3206#discussion_r1221949059
##########
core/src/main/java/org/apache/calcite/rel/rel2sql/SqlImplementor.java:
##########
@@ -1120,6 +1120,11 @@ public List<SqlNode> fieldList() {
}
void addOrderItem(List<SqlNode> orderByList, RelFieldCollation field) {
+ // If the field being ordered on is a Literal value, we can safely skip
it.
+ if (!dialect.getConformance().isSortByLiteralAllowed()
+ && field(field.getFieldIndex()) instanceof SqlLiteral) {
Review Comment:
just a question I don't know the answer to: which ordering of these checks
is more "right"? would you rather check if sortByLiteral is allowed and then
see if it's a literal? or does it make more sense to see if it's a literal and
then check if it's allowed? 🤷
--
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]