You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: SHOW CREATE TABLE loses filepath and S3 options for hive-partitioned external tables #24372
SHOW CREATE TABLE on a hive-partitioned external table (both local INFILE and URL s3option) outputs an incomplete DDL that cannot be used to recreate the table:
FILEPATH is empty ('')
For S3 tables: all S3 connection options (endpoint, bucket, access_key_id, region, provider) are lost
For S3 tables: URL s3option{...} is shown as INFILE{...}
The table itself works correctly for queries — only the DDL metadata output is wrong.
Reproduction Steps
Case 1: Local INFILE table
CREATE EXTERNAL TABLE test_show_ddl (
id INT,
part_id INT
) INFILE{'filepath'='/data/test/', 'format'='parquet', 'hive_partitioning'='true', 'hive_partition_columns'='part_id'}
FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n';
SHOW CREATE TABLE test_show_ddl;
Expected: FILEPATH='/data/test/' in output Actual: FILEPATH='' — filepath is empty
Case 2: S3 (MinIO) table
CREATE EXTERNAL TABLE test_show_ddl_s3 (
id INT,
part_id INT
) URL s3option {
'endpoint'='http://<minio-host>',
'access_key_id'='<ak>',
'secret_access_key'='<sk>',
'bucket'='my-bucket',
'filepath'='data/test/',
'region'='us-east-1',
'provider'='minio',
'format'='parquet',
'hive_partitioning'='true',
'hive_partition_columns'='part_id'
};
SHOW CREATE TABLE test_show_ddl_s3;
Expected: DDL with URL s3option{...} including endpoint, bucket, filepath, region, provider (secret_access_key can be masked) Actual:
Verified on commit: 77e514a (origin/3.0-dev, git_version() = 77e514a)
MO start method: built mo-service with Go 1.25.10, then started a clean local cluster via ./mo-service -launch /private/tmp/mo-launch-3dev/launch.toml, using isolated data-dir /private/tmp/mo-data-3dev.
SQL case:
show create table for local hive external table created with INFILE + hive_partitioning/hive_partition_columns
show create table for S3 hive external table created with URL s3option including filepath/format/hive_partitioning/hive_partition_columns
Result:
Local show create preserved FILEPATH, FORMAT='parquet', HIVE_PARTITIONING='true', HIVE_PARTITION_COLUMNS='year'
S3 show create preserved endpoint/bucket/filepath/format/hive_partitioning/hive_partition_columns, with access keys masked
Conclusion: PASS on 3.0-dev. SHOW CREATE keeps hive partition options.
Verified on commit: 3b24795 (origin/4.0-dev, git_version() = 3b24795)
MO start method: built mo-service with Go 1.25.10, then started a clean local cluster via ./mo-service -launch /private/tmp/mo-launch-4dev/launch.toml, using isolated data-dir /private/tmp/mo-data-4dev-3b24795fa.
SQL case:
show create table for local hive external table created with INFILE + filepath/format/hive_partitioning/hive_partition_columns
show create table for S3 hive external table created with URL s3option including endpoint/bucket/filepath/format/hive_partitioning/hive_partition_columns
Result:
Local SHOW CREATE output preserved FORMAT/HIVE_PARTITIONING/HIVE_PARTITION_COLUMNS, but FILEPATH became empty: FILEPATH=''
S3 SHOW CREATE output was rendered as INFILE with FILEPATH='', and did not preserve URL s3option endpoint/bucket/access options
Conclusion: FAIL on 4.0-dev. SHOW CREATE does not preserve filepath/S3 options correctly.
补充当前 MatrixOne main 75ff736835c3d00d40dc00a0a1d3b11129388e5b 回归:无需 Hive 分区,普通本地 CSV 外部表也有相同问题。
CREATE EXTERNAL TABLE e(id INT,v VARCHAR(20))
INFILE{'filepath'='/private/tmp/mo-explore-run-20261019/modump_external_rows.csv'}
FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n';
SELECT*FROM e ORDER BY id; -- 1,alpha / 2,beta
SHOW CREATE TABLE e;
Activity
Ariznawlll commentedon May 21, 2026
Verified on latest main.
Commit: 726bf23
Server check: select git_version(); => 726bf23
Test process:
make build../mo-service -launch ./etc/launch/launch.toml.Test SQL:
Actual result:
Local table keeps FILEPATH, FORMAT=parquet, HIVE_PARTITIONING=true, HIVE_PARTITION_COLUMNS=year.
S3 table keeps endpoint, masked credentials, bucket, filepath, provider, format, hive_partitioning and hive_partition_columns.
Example S3 output contains:
Result: PASS. SHOW CREATE TABLE preserves hive partition and external table options.
Ariznawlll commentedon May 21, 2026
3.0-dev verification update
Verified on commit: 77e514a (origin/3.0-dev, git_version() = 77e514a)
MO start method: built mo-service with Go 1.25.10, then started a clean local cluster via ./mo-service -launch /private/tmp/mo-launch-3dev/launch.toml, using isolated data-dir /private/tmp/mo-data-3dev.
SQL case:
Result:
Conclusion: PASS on 3.0-dev. SHOW CREATE keeps hive partition options.
Ariznawlll commentedon May 21, 2026
4.0-dev verification update
Verified on commit: 3b24795 (origin/4.0-dev, git_version() = 3b24795)
MO start method: built mo-service with Go 1.25.10, then started a clean local cluster via ./mo-service -launch /private/tmp/mo-launch-4dev/launch.toml, using isolated data-dir /private/tmp/mo-data-4dev-3b24795fa.
SQL case:
Result:
Conclusion: FAIL on 4.0-dev. SHOW CREATE does not preserve filepath/S3 options correctly.
Ariznawlll commentedon May 25, 2026
Verified on latest 4.0-dev.
Commit:
1936a09ea(1936a09ea927a9ca686e4c949df94d4d487c25bd)Environment:
origin/4.0-devselect git_version();returned1936a09eaValidation:
Ran
SHOW CREATE TABLEfor both local hive-partitioned Parquet external table and S3 external table.Results:
INFILEtable preserves filepath:URL s3optionand S3 options:The filepath and S3 options are no longer lost. This issue is verified as fixed on 4.0-dev.
Ariznawlll commentedon Oct 19, 2026
补充当前 MatrixOne main
75ff736835c3d00d40dc00a0a1d3b11129388e5b回归:无需 Hive 分区,普通本地 CSV 外部表也有相同问题。SHOW CREATE TABLE的关键部分实际为:INFILE{'FILEPATH'='','COMPRESSION'='','FORMAT'='csv','JSONDATA'=''}按该输出重建会报
ERROR 20300 (HY000): invalid configuration: the jsondata '' is not supported。三个独立新库的导出文件均记录空FILEPATH。mo-dump直接消费该 DDL,因此即使另修工具的可执行注释问题(matrixorigin/mo_dump#52),外部表仍无法恢复文件引用。请复核此 issue 关闭后普通外部表路径仍未解决的原因。