kasakrisz commented on code in PR #5505:
URL: https://github.com/apache/hive/pull/5505#discussion_r1874496858
##########
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveFilterSortTransposeRule.java:
##########
@@ -22,31 +22,36 @@
import org.apache.calcite.rel.RelNode;
import org.apache.hadoop.hive.ql.optimizer.calcite.HiveCalciteUtil;
import org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveFilter;
+import
org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveSortExchange;
import org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveSortLimit;
import com.google.common.collect.ImmutableList;
-public class HiveFilterSortTransposeRule extends RelOptRule {
+import static java.util.Collections.singletonList;
- public static final HiveFilterSortTransposeRule INSTANCE =
- new HiveFilterSortTransposeRule();
+public class HiveFilterSortTransposeRule<T extends RelNode> extends RelOptRule
{
+
+ public static final HiveFilterSortTransposeRule<HiveSortLimit>
SORT_LIMIT_INSTANCE =
+ new HiveFilterSortTransposeRule<>(HiveSortLimit.class);
+ public static final HiveFilterSortTransposeRule<HiveSortExchange>
SORT_EXCHANGE_INSTANCE =
+ new HiveFilterSortTransposeRule<>(HiveSortExchange.class);
//~ Constructors -----------------------------------------------------------
/**
* Creates a HiveFilterSortTransposeRule.
*/
- private HiveFilterSortTransposeRule() {
+ private HiveFilterSortTransposeRule(Class<T> clazz) {
Review Comment:
`T` is generics of the class HiveFilterSortTransposeRule not the
constructor. The definition has scope limitation to `RelNode`
```
public class HiveFilterSortTransposeRule<T extends RelNode> extends
RelOptRule {
```
Is that what you mean?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]