-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Description
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:
-
Create a schema:
CREATE SCHEMA hive.some_hive -
Create a managed table: ""
CREATE TABLE hive.some_hive.new_table(id int, name varchar); -
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