hsyuan commented on a change in pull request #1985: URL: https://github.com/apache/calcite/pull/1985#discussion_r429581868
########## File path: core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableFilter.java ########## @@ -68,4 +74,15 @@ public Result implement(EnumerableRelImplementor implementor, Prefer pref) { // EnumerableCalc is always better throw new UnsupportedOperationException(); } + + @Override public Pair<RelTraitSet, List<RelTraitSet>> passThroughTraits( + RelTraitSet required) { + RelCollation collation = required.getTrait(RelCollationTraitDef.INSTANCE); + if (collation == null || collation.getFieldCollations().size() == 0) { Review comment: Because some query or tests didn't add any trait defs. It is so bad decision to make Collation trait optional ❌. `ORDER BY` is sql standard, without supporting it, how can we call this a query optimizer? More freedom doesn't always make things better. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org