zabetak commented on a change in pull request #2932:
URL: https://github.com/apache/hive/pull/2932#discussion_r783984009
##########
File path:
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveAggregateSortLimitRule.java
##########
@@ -55,29 +54,13 @@
*/
public class HiveAggregateSortLimitRule extends RelOptRule {
- private static HiveAggregateSortLimitRule instance = null;
-
- public static final HiveAggregateSortLimitRule getInstance(HiveConf
hiveConf) {
- if (instance == null) {
- RelFieldCollation.NullDirection defaultAscNullDirection;
- if (HiveConf.getBoolVar(hiveConf,
HiveConf.ConfVars.HIVE_DEFAULT_NULLS_LAST)) {
- defaultAscNullDirection = RelFieldCollation.NullDirection.LAST;
- } else {
- defaultAscNullDirection = RelFieldCollation.NullDirection.FIRST;
- }
- instance = new HiveAggregateSortLimitRule(defaultAscNullDirection);
- }
-
- return instance;
- }
-
private final RelFieldCollation.NullDirection defaultAscNullDirection;
-
- private HiveAggregateSortLimitRule(RelFieldCollation.NullDirection
defaultAscNullDirection) {
+ public HiveAggregateSortLimitRule(boolean nullsLast) {
Review comment:
OK let's leave it as is for now although we may need to reconsider in
the future.
--
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]