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

create s3 failed #8421

Closed
web3creator opened this issue Dec 5, 2023 · 6 comments · Fixed by #8426
Closed

create s3 failed #8421

web3creator opened this issue Dec 5, 2023 · 6 comments · Fixed by #8426
Labels
bug Something isn't working

Comments

@web3creator
Copy link

Describe the bug

datafusion-cli
❯ CREATE EXTERNAL TABLE test
STORED AS PARQUET
OPTIONS(
'region' 'xxx',
'access_key_id' 'xxxx',
'secret_access_key' 'xxxx'
)
LOCATION 'xxxxx';
Invalid or Unsupported Configuration: Found unsupported option access_key_id with value xxxx for Parquet format!

To Reproduce

datafusion-cli

datafusion-cli
❯ CREATE EXTERNAL TABLE test
STORED AS PARQUET
OPTIONS(
    'region' 'xxx',
    'access_key_id' 'xxxx',
    'secret_access_key' 'xxxx'
)
LOCATION 'xxxxx';
Invalid or Unsupported Configuration: Found unsupported option access_key_id with value xxxx for Parquet format!
❯ 

Expected behavior

No response

Additional context

No response

@web3creator web3creator added the bug Something isn't working label Dec 5, 2023
@web3creator
Copy link
Author

@Jefffrey I also located this issue,However, I think this kind of testing is unreasonable and restrictions should be relaxed

@web3creator web3creator changed the title cretae s3 fialed create s3 fialed Dec 5, 2023
@devinjdangelo
Copy link
Contributor

The reason for the strict checking is to help identify typos or logical errors easily in SQL queries rather than silently ignoring invalid options. Given that datafusion-cli is using the same data structure to store additional options, there are a few options:

  • Add the additional datafusion-cli valid options to datafusion proper so they can be silently ignored rather than error
  • Have datafusion-cli remove any valid datafusion-cli specific options in the create external table statement before executing the statement
  • Downgrade the configuration error in datafusion to a warning message so execution doesn't fail

I favor one of the first two options, but the third may be the best if we expect this problem to crop up beyond datafusion-cli. The question would be if it is likely for many downstream projects to inject additional options passed to a ListingTable or CopyTo statement.

@devinjdangelo
Copy link
Contributor

devinjdangelo commented Dec 5, 2023

Here is a quick draft PR that implements option 2. Let me know if this branch solves your issue. I'll try to get some time to verify with a real S3 bucket myself in the next day or two. #8426

@web3creator web3creator changed the title create s3 fialed create s3 failed Dec 5, 2023
@alamb
Copy link
Contributor

alamb commented Dec 5, 2023

BTW it would be great if someone could write a regression test in datafusion-cli somehow so this functionality is not broken again (@web3creator is this something you could potentially help with?)

@alamb
Copy link
Contributor

alamb commented Dec 7, 2023

Thanks everyone for the quick fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
4 participants