Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(CLI): can not create external tables with format options #10739

Merged
merged 1 commit into from
May 31, 2024

Conversation

jonahgao
Copy link
Member

@jonahgao jonahgao commented May 31, 2024

Which issue does this PR close?

Closes #10737.

Rationale for this change

When setting format options for TableOptions,

table_options.alter_with_string_hash_map(options)?;

the current_format of TableOptions must already exist, which means set_file_format must be called with a non-none file type first.

let Some(format) = &self.current_format else {
return _config_err!("Specify a format for TableOptions");
};

What changes are included in this PR?

Are these changes tested?

Yes

Are there any user-facing changes?

No

@berkaysynnada
Copy link
Contributor

Good catch 👍🏻 This explicit setup may not be very user-friendly, but it's necessary since we accept file formats directly from CreateExternalTable rather than from OPTIONS.

Copy link
Contributor

@comphead comphead left a comment

Choose a reason for hiding this comment

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

lgtm thanks @jonahgao
💪

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you @jonahgao 🙏

@alamb alamb merged commit 7fd286b into apache:main May 31, 2024
25 checks passed
@jonahgao jonahgao deleted the fix_external branch June 1, 2024 02:49
@jonahgao
Copy link
Member Author

jonahgao commented Jun 1, 2024

Thanks for the review @berkaysynnada @comphead @alamb

findepi pushed a commit to findepi/datafusion that referenced this pull request Jul 16, 2024
Sign up for free to 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.

CLI cannot create external tables with format options
4 participants