xndai commented on a change in pull request #1884:
URL: https://github.com/apache/calcite/pull/1884#discussion_r422583239
##########
File path: core/src/main/java/org/apache/calcite/tools/RelBuilder.java
##########
@@ -2497,6 +2504,15 @@ public RelBuilder sortLimit(int offset, int fetch,
RexNode... nodes) {
return sortLimit(offset, fetch, ImmutableList.copyOf(nodes));
}
+ /** Creates a {@link Sort} by specifying collations.
+ */
+ public RelBuilder sort(RelCollation collation) {
+ final RelNode sort =
Review comment:
This is a sort, not limit operator. So we don't need them.
##########
File path: core/src/main/java/org/apache/calcite/plan/Convention.java
##########
@@ -66,6 +67,13 @@ default boolean
useAbstractConvertersForConversion(RelTraitSet fromTraits,
return false;
}
+ /**
+ * Return RelFactories struct for the convention which can be used to build
RelNode
+ */
+ default RelFactories.Struct getRelFactories() {
+ return RelFactories.DEFAULT_STRUCT;
+ }
Review comment:
The thing is you don't want people to update RelFactories.java whenever
there's a new convention available. Convention#getRelFactories seperates the
logics, and can totally lives in user code base, instead of Calcite core.
----------------------------------------------------------------
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:
[email protected]