kgyrtkirk commented on code in PR #16301:
URL: https://github.com/apache/druid/pull/16301#discussion_r1576154532


##########
sql/src/main/java/org/apache/druid/sql/calcite/rel/Windowing.java:
##########
@@ -240,11 +240,16 @@ public static Windowing fromCalciteStuff(
 
     // Apply windowProject, if present.
     if (partialQuery.getWindowProject() != null) {
-      // We know windowProject is a mapping due to the isMapping() check in 
DruidRules. Check for null anyway,
-      // as defensive programming.
+      // We know windowProject is a mapping due to the isMapping() check in 
DruidRules.
+      // check anyway as defensive programming.
+      Preconditions.checkArgument(partialQuery.getWindowProject().isMapping());

Review Comment:
   possibly extracting `partialQuery.getWindowProject()` into a local variable 
may make it more readable



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