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

Parsing table alias is failing if query has table properties specified

    XMLWordPrintableJSON

Details

    Description

      select t1.ROW__IS__DELETED, t1.*, t2.ROW__IS__DELETED, t2.* from t1('acid.fetch.deleted.rows'='true')
      join t2('acid.fetch.deleted.rows'='true') on t1.a = t2.a;
      

      When creating Join RelNode the aliases are used to lookup left and right input RelNodes. Aliases are extracted from the AST subtree of the left and right inputs of the join AST node. In case of a table reference:

      TOK_TABREF
         TOK_TABNAME
            t1
         TOK_TABLEPROPERTIES
            TOK_TABLEPROPLIST
               TOK_TABLEPROPERTY
                  'acid.fetch.deleted.rows'
                  'true'
      

      Prior HIVE-24854 queries mentioned above failed because existing solution was not expect TOK_TABLEPROPERTIES.

      The goal of this patch is to parse TOK_TABREF properly using existing solution also used in SemanticAnalyser.doPhase1

      Attachments

        Issue Links

          Activity

            People

              kkasa Krisztian Kasa
              kkasa Krisztian Kasa
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m