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

After setting UpdateInputAccessTimeHook query fail Table Not Found. when use 'with xxx as ...'

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • 4.0.0-beta-1
    • 4.1.0
    • Hive
    • None
    • Incompatible change

    Description

      SET hive.exec.pre.hooks=org.apache.hadoop.hive.ql.hooks.UpdateInputAccessTimeHook$PreExec;
      
      WITH tmp_data as (SELECT device_id, ip, request_id FROM dwd.impression WHERE d = '20240305')
      INSERT OVERWRITE TABLE dms.aaa PARTITION ( d = '20240305', part)
      SELECT a.column_value AS column_value, a.part AS part
      FROM (SELECT device_id AS column_value, 'device'  as part
            FROM (SELECT device_id, COUNT(DISTINCT request_id) AS req_count FROM tmp_data GROUP BY device_id) AS a
            WHERE req_count > 50
      
            UNION ALL
      
            SELECT device_id AS column_value, 'device'  as part
            FROM (SELECT device_id, COUNT(DISTINCT ip) AS ip_count FROM tmp_data GROUP BY device_id) AS a
            WHERE ip_count > 3
      
           ) AS a
               LEFT JOIN dms.ivt ivt ON a.column_value = ivt.column_value
      WHERE ivt.column_value IS NULL;
       

      the second select failĀ  whith following exception

      Error while processing statement: 
      FAILED: Hive Internal Error: org.apache.hadoop.hive.ql.metadata.InvalidTableException(Table not found tmp_data) 

      Attachments

        Activity

          People

            Jinxin Liu
            Jinxin Liu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: