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

Temp table with CTAS tries to create staging directory in the actual database directory

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • None
    • Query Planning
    • None

    Description

      User does not have FS permissions on the database directory.
      Note that normal CREATE TEMPORARY TABLE (no CTAS) on that database does work.
      However trying temp table with CTAS fails with the following error:

      hive> create temporary table jdere_temp as select * from tpch_text_1000.nation;
      FAILED: SemanticException 0:0 Error creating temporary folder on: hdfs://cn105-10.l42scl.hortonworks.com:8020/apps/hive/warehouse/tpch_text_1000.db. Error encountered near token 'TOK_TMP_FILE'
      

      Simple fix would be to set the staging directory to the temp table location for the case of temp tables.

      Attachments

        Activity

          People

            jdere Jason Dere
            jdere Jason Dere
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: