abstractdog commented on code in PR #6560:
URL: https://github.com/apache/hive/pull/6560#discussion_r3479814147


##########
ql/src/java/org/apache/hadoop/hive/ql/QueryProperties.java:
##########


Review Comment:
   these seem to be features too



##########
ql/src/java/org/apache/hadoop/hive/ql/QueryProperties.java:
##########
@@ -64,25 +83,8 @@ public String getName() {
   int outerQueryLimit;
 
   boolean hasJoin = false;
-  boolean hasGroupBy = false;
-  boolean hasOrderBy = false;
-  boolean hasOuterOrderBy = false;
-  boolean hasSortBy = false;
-  boolean hasLimit = false;
-  boolean hasJoinFollowedByGroupBy = false;
-  boolean hasPTF = false;
-  boolean hasWindowing = false;
-  boolean hasQualify = false;
-  boolean hasExcept = false;
-  boolean hasIntersect = false;
-
-  // does the query have a using clause
-  boolean usesScript = false;
-
-  boolean hasDistributeBy = false;
-  boolean hasClusterBy = false;
+  private final EnumSet<QueryFeature> features = 
EnumSet.noneOf(QueryFeature.class);
   boolean mapJoinRemoved = false;
-  boolean hasMapGroupBy = false;
 
   private boolean hasLateralViews = false;
   private boolean cboSupportedLateralViews = true;

Review Comment:
   these seem to be features too



##########
ql/src/java/org/apache/hadoop/hive/ql/QueryProperties.java:
##########


Review Comment:
   these seem to be features too



##########
ql/src/java/org/apache/hadoop/hive/ql/QueryProperties.java:
##########
@@ -196,116 +198,124 @@ public boolean isCBOSupportedLateralViews() {
     return cboSupportedLateralViews;
   }
 
+  public void addFeature(QueryFeature feature) {
+    features.add(feature);
+  }
+
+  public boolean hasFeature(QueryFeature feature) {
+    return features.contains(feature);
+  }
+
   public boolean hasGroupBy() {

Review Comment:
   the jira description says "the class is unnecessarily verbose since each 
feature requires a dedicated getter/setter"
   I feel we can go on with removing these without deprecation



-- 
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]

Reply via email to