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

Issue when creating an external table in Presto Hive Connector #23977

Open
imjalpreet opened this issue Nov 7, 2024 · 0 comments · May be fixed by #23994
Open

Issue when creating an external table in Presto Hive Connector #23977

imjalpreet opened this issue Nov 7, 2024 · 0 comments · May be fixed by #23994
Labels

Comments

@imjalpreet
Copy link
Member

imjalpreet commented Nov 7, 2024

In the current implementation of CREATE TABLE WITH (external_location), if the external location does not already exist, Presto raises an exception stating failed: External location must be a directory.

if (!hdfsEnvironment.getFileSystem(context, path).isDirectory(path)) {

I wanted to get the community's view on whether Presto should create the directory if it doesn't exist rather than throwing the error. We could check if the location exists before verifying if it is a directory.

We allow CREATE SCHEMA WITH (location) even if the specified location does not exist. The missing directories will be created whenever a managed table is created under the schema.

@github-project-automation github-project-automation bot moved this to 🆕 Unprioritized in Bugs and support requests Nov 7, 2024
imjalpreet added a commit to imjalpreet/presto that referenced this issue Nov 9, 2024
… location

Skip throwing the exception (External location must be a directory) when location doesn't exist yet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 🆕 Unprioritized
Development

Successfully merging a pull request may close this issue.

1 participant