You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Naveen Gangam (Jira)" <ji...@apache.org> on 2020/08/27 19:38:00 UTC

[jira] [Created] (HIVE-24086) CTAS with HMS translation enabled returns empty results.

Naveen Gangam created HIVE-24086:
------------------------------------

             Summary: CTAS with HMS translation enabled returns empty results.
                 Key: HIVE-24086
                 URL: https://issues.apache.org/jira/browse/HIVE-24086
             Project: Hive
          Issue Type: Bug
          Components: Hive
            Reporter: Naveen Gangam
            Assignee: Naveen Gangam


when you execute something like 
create table ctas_table as select * from mgd_table;

if mgd_table is a managed table, the hive query planner creates a plan with ctas_table as a managed table, so the location is set to something in the managed warehouse directory.

However with HMS translation enabled, non-acid MANAGED tables are converted to EXTERNAL with purge set to true. So the table location for this table is altered to be in the external warehouse directory.
But after the table creation, the rest of the query executes but the data is copied to the location set in the query plan. As a result when you execute a select from ctas_table, it will not return any results because that location is empty.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)