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

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

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.2.0
    • Fix Version/s: 1.3.0, 2.0.0
    • Component/s: CBO
    • Labels:

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

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: