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/23 20:54:24 UTC

[GitHub] [druid] github-code-scanning[bot] commented on a diff in pull request #13803: nested columns + arrays = array columns!

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


##########
processing/src/main/java/org/apache/druid/segment/UnnestColumnValueSelectorCursor.java:
##########
@@ -307,14 +320,8 @@
    */
   private void advanceAndUpdate()
   {
-    if (unnestListForCurrentRow.isEmpty() || index >= unnestListForCurrentRow.size() - 1) {
-      index = 0;
-      baseCursor.advance();
-      if (!baseCursor.isDone()) {
-        getNextRow();
-      }
-    } else {
-      index++;
+    if (++index >= unnestListForCurrentRow.size()) {

Review Comment:
   ## User-controlled data in arithmetic expression
   
   This arithmetic expression depends on a [user-provided value](1), potentially causing an overflow.
   This arithmetic expression depends on a [user-provided value](2), potentially causing an overflow.
   This arithmetic expression depends on a [user-provided value](3), potentially causing an overflow.
   
   [Show more details](https://github.com/apache/druid/security/code-scanning/4484)



##########
processing/src/main/java/org/apache/druid/query/metadata/SegmentAnalyzer.java:
##########
@@ -385,4 +389,28 @@
       );
     }
   }
+
+  private ColumnAnalysis analyzeArrayColumn(
+      @Nullable final ColumnCapabilities capabilities,
+      final int numCells,
+      @Nullable final ColumnHolder columnHolder

Review Comment:
   ## Useless parameter
   
   The parameter 'columnHolder' is never used.
   
   [Show more details](https://github.com/apache/druid/security/code-scanning/4483)



##########
processing/src/main/java/org/apache/druid/query/metadata/SegmentAnalyzer.java:
##########
@@ -385,4 +389,28 @@
       );
     }
   }
+
+  private ColumnAnalysis analyzeArrayColumn(
+      @Nullable final ColumnCapabilities capabilities,
+      final int numCells,

Review Comment:
   ## Useless parameter
   
   The parameter 'numCells' is never used.
   
   [Show more details](https://github.com/apache/druid/security/code-scanning/4482)



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