This is an automated email from the ASF dual-hosted git repository.

dzamo pushed a commit to branch calcite-1.34-test
in repository https://gitbox.apache.org/repos/asf/drill.git


The following commit(s) were added to refs/heads/calcite-1.34-test by this push:
     new 8f0332d2a2 Prevent IOOB.
8f0332d2a2 is described below

commit 8f0332d2a2fc6e790a1e9a24bd0f75fb57e21305
Author: James Turton <[email protected]>
AuthorDate: Tue Mar 7 16:53:06 2023 +0200

    Prevent IOOB.
---
 .../drill/exec/planner/sql/parser/CompoundIdentifierConverter.java     | 3 +++
 1 file changed, 3 insertions(+)

diff --git 
a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/parser/CompoundIdentifierConverter.java
 
b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/parser/CompoundIdentifierConverter.java
index 6aca6ba847..37dec95569 100644
--- 
a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/parser/CompoundIdentifierConverter.java
+++ 
b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/parser/CompoundIdentifierConverter.java
@@ -183,6 +183,9 @@ public class CompoundIdentifierConverter extends SqlShuttle 
{
 
       boolean localEnableComplex = enableComplex;
       if (rewriteTypes != null) {
+        if (i >= rewriteTypes.length) {
+          return null;
+        }
         switch (rewriteTypes[i]) {
           case DISABLE:
             enableComplex = false;

Reply via email to