rubenada commented on code in PR #6523:
URL: https://github.com/apache/hive/pull/6523#discussion_r3557244100


##########
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/views/HiveAugmentSnapshotMaterializationRule.java:
##########
@@ -146,6 +146,12 @@ public void onMatch(RelOptRuleCall call) {
 
     final RelBuilder relBuilder = call.builder();
     relBuilder.push(tableScan);
+    if (snapshotId == null) {
+      // Avoid creating an incorrect expression $snapshotIdInputRef <= NULL
+      // which may be problematic for Calcite later on; instead use a special 
value -1,
+      // which will be later interpreted by HivePushdownSnapshotFilterRule 
(and removed)
+      snapshotId = -1L;
+    }

Review Comment:
   I implemented this piece of code with some help from @kasakrisz :) 



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