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]: s3option + format='parquet' rejected by InitS3Param (blocks hive_partitioning over S3) #24341
Tested on PR #24329 branch iamlinjunhong:dp-hive (commit ab6058a)
Actual Behavior
PR #24329 documents a usage pattern of combining URL s3option{...} with hive_partitioning='true' + format='parquet'. The DDL succeeds, but any SELECT fails:
ERROR 20300 (HY000): invalid configuration: the format 'parquet' is not supported
Reproduction
create external table t1 (
id int, y int
) URL s3option {
'endpoint'='localhost:9100',
'access_key_id'='minioadmin',
'secret_access_key'='minioadmin',
'bucket'='any',
'filepath'='any/',
'provider'='minio',
'format'='parquet'
};
-- DDL succeedsselect*from t1 limit1;
-- ERROR 20300 (HY000): invalid configuration: the format 'parquet' is not supported
// pkg/sql/plan/utils.go:1735ifformat!=tree.CSV&&format!=tree.JSONLINE&&format!=tree.PARQUET {
returnmoerr.NewBadConfigf(param.Ctx, "the format '%s' is not supported", format)
}
But InitS3Param (s3option path) does not — tree.PARQUET is missing from the allowlist:
// pkg/sql/plan/utils.go:1796ifformat!=tree.CSV&&format!=tree.JSONLINE {
returnmoerr.NewBadConfigf(param.Ctx, "the format '%s' is not supported", format)
}
Impact
The PR's user guide explicitly promotes URL s3option{...} as the primary production usage pattern (section "3. Point at S3"), but this code path is unusable. Only local infile{...} + parquet works today.
Since the whole point of hive_partitioning is lakehouse interop over S3, this blocks the feature's main use case.
Fix
Add tree.PARQUET to the allowed-format list in InitS3Param, mirroring InitFileParam.
Expected Behavior
URL s3option{... 'format'='parquet' ...} should behave identically to infile{... 'format'='parquet' ...} for both hive-partitioned and non-hive external tables.
PR #24321 (feat(external): support Hive-style partitioned Parquet external tables) merged to main on 2026-05-12 includes the fix for InitS3Param format validation.
In pkg/sql/plan/utils.go line 1989, InitS3Param now accepts tree.PARQUET:
case"format":
format:=strings.ToLower(param.Option[i+1])
ifformat!=tree.CSV&&format!=tree.JSONLINE&&format!=tree.PARQUET {
returnmoerr.NewBadConfigf(param.Ctx, "the format '%s' is not supported", format)
}
param.Format=format
Additionally, the hive partitioning options are now parsed via parseHiveOptionKV in the S3 path (line 1959), and validateHiveOptionConsistency is called after option parsing (line 2005), enabling full URL s3option{... 'format'='parquet', 'hive_partitioning'='true' ...} support.
This means the primary production pattern (hive-partitioned external tables over S3) is now functional, matching the behavior of the infile{...} path.
Note: unable to run full unit tests locally due to C dependency build issues, but code-level verification confirms the fix is complete.
Activity
Ariznawlll commentedon May 12, 2026
Verification on latest
main(commit b136990)Result: FIXED ✅
PR #24321 (
feat(external): support Hive-style partitioned Parquet external tables) merged tomainon 2026-05-12 includes the fix forInitS3Paramformat validation.In
pkg/sql/plan/utils.goline 1989,InitS3Paramnow acceptstree.PARQUET:Additionally, the hive partitioning options are now parsed via
parseHiveOptionKVin the S3 path (line 1959), andvalidateHiveOptionConsistencyis called after option parsing (line 2005), enabling fullURL s3option{... 'format'='parquet', 'hive_partitioning'='true' ...}support.This means the primary production pattern (hive-partitioned external tables over S3) is now functional, matching the behavior of the
infile{...}path.Note: unable to run full unit tests locally due to C dependency build issues, but code-level verification confirms the fix is complete.
Ariznawlll commentedon May 12, 2026
Verification on 3.0-dev (commit 5fde73e)
Result: FIXED on 3.0-dev
InitS3Param on 3.0-dev correctly accepts
tree.PARQUETin the format validation:This was included in PR #24329 which is already on 3.0-dev. The S3 + parquet + hive_partitioning path is functional.
Ariznawlll commentedon May 15, 2026
Verified fixed on both branches — closing.