You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by jo...@apache.org on 2019/05/17 23:36:48 UTC

[impala] branch master updated (a9f5814 -> 98a79c8)

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

joemcdonnell pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git.


    from a9f5814  Bump toolchain version to 35-4c4c185a57 to pick up CMake 3.14.3
     new 4767d92  IMPALA-8497: Fix ArrayIndexOutOfBoundsException for queries that end with '\n'
     new 092ba57  Update distcc README
     new 98a79c8  Add USE_CDP_HIVE=true case to build-all-flag-combinations.sh

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 bin/distcc/README.md                               |  4 +-
 bin/jenkins/build-all-flag-combinations.sh         | 11 +++++-
 fe/src/main/cup/sql-parser.cup                     |  3 +-
 .../org/apache/impala/analysis/ParserTest.java     | 45 ++++++++++++++++++++++
 4 files changed, 59 insertions(+), 4 deletions(-)


[impala] 03/03: Add USE_CDP_HIVE=true case to build-all-flag-combinations.sh

Posted by jo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

joemcdonnell pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git

commit 98a79c8ce190ff86eb7e95c3ecdda059ffeeed4a
Author: Joe McDonnell <jo...@cloudera.com>
AuthorDate: Tue May 14 15:39:19 2019 -0700

    Add USE_CDP_HIVE=true case to build-all-flag-combinations.sh
    
    This does a basic debug build with USE_CDP_HIVE=true to verify we don't
    break anything.
    
    Change-Id: I3f8e689242e20efb37fbadf7c04764ea8ffb9a9f
    Reviewed-on: http://gerrit.cloudera.org:8080/13335
    Reviewed-by: Joe McDonnell <jo...@cloudera.com>
    Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
 bin/jenkins/build-all-flag-combinations.sh | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/bin/jenkins/build-all-flag-combinations.sh b/bin/jenkins/build-all-flag-combinations.sh
index 200729e..cbbc7c4 100755
--- a/bin/jenkins/build-all-flag-combinations.sh
+++ b/bin/jenkins/build-all-flag-combinations.sh
@@ -42,12 +42,21 @@ CONFIGS=(
   "-skiptests -noclean -asan"
   "-skiptests -noclean -tsan"
   "-skiptests -noclean -ubsan -so -ninja"
+  # USE_CDP_HIVE=true build:
+  "-skiptests -noclean -use_cdp_hive"
 )
 
 FAILED=""
 
 for CONFIG in "${CONFIGS[@]}"; do
-  DESCRIPTION="Options $CONFIG"
+  CONFIG2=${CONFIG/-use_cdp_hive/}
+  if [[ "$CONFIG" != "$CONFIG2" ]]; then
+    CONFIG=$CONFIG2
+    export USE_CDP_HIVE=true
+  else
+    export USE_CDP_HIVE=false
+  fi
+  DESCRIPTION="Options $CONFIG USE_CDP_HIVE=$USE_CDP_HIVE"
 
   if [[ $# == 1 && $1 == "--dryrun" ]]; then
     echo $DESCRIPTION


[impala] 01/03: IMPALA-8497: Fix ArrayIndexOutOfBoundsException for queries that end with '\n'

Posted by jo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

joemcdonnell pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git

commit 4767d9263782d132ca1eeef8fea7761dc746354f
Author: wangsheng <sk...@163.com>
AuthorDate: Tue May 7 10:15:47 2019 +0800

    IMPALA-8497: Fix ArrayIndexOutOfBoundsException for queries that
    end with '\n'
    
    When query ends with '\n', impala would throw
    ArrayIndexOutOfBoundsException, instead of a syntax error.
    The bug only affects the queries submitted directly to
    Impala outside Impala shell.
    
    Tests:
      * Added test cases in ParserTest.java
      * Ran all front-end tests
    
    Change-Id: I3f034b351d0468a77773f6482e27ddef818b34d8
    Reviewed-on: http://gerrit.cloudera.org:8080/13293
    Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
    Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
 fe/src/main/cup/sql-parser.cup                     |  3 +-
 .../org/apache/impala/analysis/ParserTest.java     | 45 ++++++++++++++++++++++
 2 files changed, 47 insertions(+), 1 deletion(-)

diff --git a/fe/src/main/cup/sql-parser.cup b/fe/src/main/cup/sql-parser.cup
index 17e7dd4..df6fbf1 100644
--- a/fe/src/main/cup/sql-parser.cup
+++ b/fe/src/main/cup/sql-parser.cup
@@ -170,7 +170,8 @@ parser code {:
   // that parse() has been called and threw an exception
   public String getErrorMsg(String stmt) {
     if (errorToken_ == null || stmt == null) return null;
-    String[] lines = stmt.split("\n");
+    // IMPALA-8497: Fix ArrayIndexOutOfBoundsException for queries that end with '\n'
+    String[] lines = stmt.split("\n", -1);
     StringBuffer result = new StringBuffer();
     result.append(getErrorTypeMessage(errorToken_.sym) + " in line ");
     result.append(errorToken_.left);
diff --git a/fe/src/test/java/org/apache/impala/analysis/ParserTest.java b/fe/src/test/java/org/apache/impala/analysis/ParserTest.java
index cc30926..d63bb7f 100644
--- a/fe/src/test/java/org/apache/impala/analysis/ParserTest.java
+++ b/fe/src/test/java/org/apache/impala/analysis/ParserTest.java
@@ -3435,6 +3435,24 @@ public class ParserTest extends FrontendTestBase {
          "       ^\n" +
          "Encountered: EOF\n" +
          "Expected: =\n");
+
+    // End with \n
+    ParserError("SELECT\n",
+         "Syntax error in line 2:\n" +
+         "\n" +
+         "^\n" +
+         "Encountered: EOF\n" +
+         "Expected: ALL, CASE, CAST, DATE, DEFAULT, DISTINCT, EXISTS, FALSE, " +
+         "IF, INTERVAL, LEFT, NOT, NULL, REPLACE, RIGHT, " +
+         "STRAIGHT_JOIN, TRUNCATE, TRUE, IDENTIFIER\n");
+    ParserError("SELECT\n\n",
+         "Syntax error in line 3:\n" +
+         "\n" +
+         "^\n" +
+         "Encountered: EOF\n" +
+         "Expected: ALL, CASE, CAST, DATE, DEFAULT, DISTINCT, EXISTS, FALSE, " +
+         "IF, INTERVAL, LEFT, NOT, NULL, REPLACE, RIGHT, " +
+         "STRAIGHT_JOIN, TRUNCATE, TRUE, IDENTIFIER\n");
   }
 
   @Test
@@ -3970,4 +3988,31 @@ public class ParserTest extends FrontendTestBase {
     ParserError("select * from .123_bar");
     ParserError("select * from . 123_bar");
   }
+
+  @Test
+  public void TestLineBreakEnd() {
+    ParserError("--test\n");
+    ParserError("--test\n  ");
+    ParserError("SELECT\n");
+    ParserError("SELECT\n  ");
+    ParserError("SHOW\n");
+    ParserError("SHOW\n  ");
+    ParserError("INSERT\n");
+    ParserError("INSERT\n  ");
+    ParserError("DROP\n");
+    ParserError("DROP\n  ");
+    ParserError("  \n");
+    ParserError("\n  ");
+    ParserError("\n");
+
+    ParserError("SELECT\n\n");
+    ParserError("SELECT\n\n\n");
+    ParserError("SELECT\n\n \n");
+    ParserError("SELECT\n \n\n");
+    ParserError("SELECT\n\n  ");
+    ParserError("SELECT  \n\n");
+
+    ParsesOk("--test\nSELECT 1\n");
+    ParsesOk("--test\nSELECT 1\n  ");
+  }
 }


[impala] 02/03: Update distcc README

Posted by jo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

joemcdonnell pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git

commit 092ba576186855d4838699b8e9f26e4417258f65
Author: Zoltan Borok-Nagy <bo...@cloudera.com>
AuthorDate: Thu May 16 14:52:38 2019 +0200

    Update distcc README
    
    Removed unnecessary toolchain directory creation from distcc/README.md.
    
    Change-Id: Iaf9d4b94bbec6d307f0688b998f908a104873833
    Reviewed-on: http://gerrit.cloudera.org:8080/13362
    Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
    Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
 bin/distcc/README.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/distcc/README.md b/bin/distcc/README.md
index 180df0d..e0899bc 100644
--- a/bin/distcc/README.md
+++ b/bin/distcc/README.md
@@ -30,8 +30,8 @@ The rest of the setup is done for you; here is a short description of what they
   IMPALA_TOOLCHAIN at that directory. This ensures toolchain binaries are at the
   same path locally as on the distcc servers
 
-        mkdir -p "$IMPALA_TOOLCHAIN"/toolchain
-        sudo ln -s "$IMPALA_TOOLCHAIN"/toolchain /opt/Impala-Toolchain
+        mkdir -p "$IMPALA_TOOLCHAIN"
+        sudo ln -s "$IMPALA_TOOLCHAIN" /opt/Impala-Toolchain
         echo 'export IMPALA_TOOLCHAIN=/opt/Impala-Toolchain' >> bin/impala-config-local.sh
 
 1. Source bin/impala-config.sh in the Impala repo. Step #2 depends on this.