Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-10190

CBO: AST mode checks for TABLESAMPLE with AST.toString().contains("TOK_TABLESPLITSAMPLE")

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 1.2.0
    • 1.3.0, 2.0.0
    • CBO

    Description

      public static boolean validateASTForUnsupportedTokens(ASTNode ast) {
          String astTree = ast.toStringTree();
          // if any of following tokens are present in AST, bail out
          String[] tokens = { "TOK_CHARSETLITERAL", "TOK_TABLESPLITSAMPLE" };
          for (String token : tokens) {
            if (astTree.contains(token)) {
              return false;
            }
          }
          return true;
        }
      

      This is an issue for a SQL query which is bigger in AST form than in text (~700kb).

      Attachments

        1. HIVE-10190-querygen.py
          0.6 kB
          Gopal Vijayaraghavan
        2. HIVE-10190.12.patch
          4 kB
          Reuben Kuhnert
        3. HIVE-10190.11.patch
          4 kB
          Reuben Kuhnert
        4. HIVE-10190.10.patch
          4 kB
          Reuben Kuhnert
        5. HIVE-10190.09.patch
          4 kB
          Reuben Kuhnert
        6. HIVE-10190.08.patch
          5 kB
          Reuben Kuhnert
        7. HIVE-10190.07.patch
          5 kB
          Reuben Kuhnert
        8. HIVE-10190.06.patch
          4 kB
          Reuben Kuhnert
        9. HIVE-10190.05.patch
          1 kB
          Reuben Kuhnert
        10. HIVE-10190.05.patch
          1 kB
          Sergio Peña
        11. HIVE-10190.04.patch
          1 kB
          Reuben Kuhnert
        12. HIVE-10190.03.patch
          3 kB
          Reuben Kuhnert
        13. HIVE-10190.02.patch
          2 kB
          Reuben Kuhnert
        14. HIVE-10190.01.patch
          2 kB
          Pengcheng Xiong

        Issue Links

          Activity

            People

              sircodesalot Reuben Kuhnert
              gopalv Gopal Vijayaraghavan
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: