Skip to content

SHOW CREATE TABLE return managed table path as external_location for hive connector #28483

@Kundannitp

Description

@Kundannitp

Problem Statement:
SHOW CREATE TABLE cmd for hive connector is returning managed table path as external_location causing confusion that the table is managed or external and violates the Principle of Least Surprise.

Steps to reproduce:

  1. Create a schema:
    CREATE SCHEMA hive.some_hive

  2. Create a managed table: ""
    CREATE TABLE hive.some_hive.new_table(id int, name varchar);

  3. show create table hive.some_hive.new_table;

Current Output:
trino> show create table hive.some_hive.new_table;
Create Table
--------------------------------------------------------------------------------------------
CREATE TABLE hive.some_hive.new_table (
id integer,
name varchar
)
WITH (
external_location = 'hdfs://localhost:9000/user/hive/warehouse/some_hive.db/new_table',
format = 'ORC'
)
(1 row)

Query 20260227_172350_00005_3ugvw, FINISHED, 1 node
Splits: 1 total, 1 done (100.00%)
0.37 [0 rows, 0B] [0 rows/s, 0B/s]

trino>

Expected output:
The "external_location" keyword should be either "location" or it should not be present for managed table at all.

Trino Version:
Compiled from master

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions