You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "github-code-scanning[bot] (via GitHub)" <gi...@apache.org> on 2023/03/08 19:10:29 UTC

[GitHub] [druid] github-code-scanning[bot] commented on a diff in pull request #13902: Window planning: use collation traits, improve subquery logic.

github-code-scanning[bot] commented on code in PR #13902:
URL: https://github.com/apache/druid/pull/13902#discussion_r1129915039


##########
sql/src/main/java/org/apache/druid/sql/calcite/rel/Windowing.java:
##########
@@ -396,4 +434,59 @@
       return ((Number) getConstantArgument(argPosition).getValue()).intValue();
     }
   }
+
+  /**
+   * Return a list of {@link ColumnWithDirection} corresponding to a {@link RelCollation}.
+   *
+   * @param collation          collation
+   * @param sourceRowSignature signature of the collated rows
+   */
+  private static LinkedHashSet<ColumnWithDirection> computeSortColumnsFromRelCollation(
+      final RelCollation collation,
+      final RowSignature sourceRowSignature
+  )
+  {
+    final LinkedHashSet<ColumnWithDirection> retVal = new LinkedHashSet<>();
+
+    for (RelFieldCollation fieldCollation : collation.getFieldCollations()) {
+      ColumnWithDirection.Direction direction = null;
+
+      switch (fieldCollation.getDirection()) {

Review Comment:
   ## Missing enum case in switch
   
   Switch statement does not have a case for [CLUSTERED](1).
   
   [Show more details](https://github.com/apache/druid/security/code-scanning/4384)



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org