Skip to content

Fixing location for extrenal tables - #2108

Merged
iffyio merged 1 commit into
apache:mainfrom
romanoff:external_table_location_fix
Dec 3, 2025
Merged

Fixing location for extrenal tables#2108
iffyio merged 1 commit into
apache:mainfrom
romanoff:external_table_location_fix

Conversation

@romanoff

Copy link
Copy Markdown

Location isn't required for external tables for hive. Example of query:

CREATE EXTERNAL TABLE my_table (
c INT
)

Spec:
https://hive.apache.org/docs/latest/language/languagemanual-ddl/?utm_source=chatgpt.com#external-tables

It says: The EXTERNAL keyword lets you create a table and provide a LOCATION so that Hive does not use a default location. It's not very clear, but if location is not specified, it will provide default location.

Comment threadtests/sqlparser_hive.rs Outdated
Comment on lines +570 to +573
#[test]
fn parse_create_external_table_without_location() {
hive().verified_stmt("CREATE EXTERNAL TABLE t (c INT)");
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add this entry to this existing test case instead?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iffyio Updated. Thank you

@romanoff
romanoffforce-pushed the external_table_location_fix branch from 37581a6 to cca494eCompareDecember 1, 2025 18:07
@romanoff
romanoffforce-pushed the external_table_location_fix branch from cca494e to 69981a2CompareDecember 1, 2025 18:08

@iffyioiffyio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @romanoff!

@iffyio
iffyio added this pull request to the merge queueDec 3, 2025
Merged via the queue into apache:main with commit 5a3b63bDec 3, 2025
10 checks passed
ayman-sigma pushed a commit to sigmacomputing/sqlparser-rs that referenced this pull request Feb 3, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@romanoff@iffyio