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

Feature: infer_schema support normal file path. #12458

Open
RinChanNOWWW opened this issue Aug 14, 2023 · 2 comments
Open

Feature: infer_schema support normal file path. #12458

RinChanNOWWW opened this issue Aug 14, 2023 · 2 comments
Labels
C-feature Category: feature

Comments

@RinChanNOWWW
Copy link
Collaborator

RinChanNOWWW commented Aug 14, 2023

Summary

We can query file by normal file paths or stage, such as:

select * from 'fs:///home/...';
select * from 's3://bucket/...';
select * from @stage;

However, we only can call infer_schema on stage files:

select * from infer_schema(location=>'@stage/...');

select * from infer_schema(location =>'fs:///home/...'); -- this will panic.

We should unify the behavior.

@RinChanNOWWW RinChanNOWWW added the C-feature Category: feature label Aug 14, 2023
@ljluestc
Copy link

ljluestc commented Sep 5, 2023

-- Use 'SELECT *' as an example query, modify as needed
-- For querying files directly
SELECT * FROM 'fs:///home/...';
SELECT * FROM 's3://bucket/...';

-- For querying from a stage
SELECT * FROM @stage;

-- For inferring schema from stage files
SELECT * FROM infer_schema(location => '@stage/...');

-- To achieve unified behavior, use the same method for both
SELECT * FROM infer_schema(location => 'fs:///home/...'); -- or other locations

@RinChanNOWWW
Copy link
Collaborator Author

RinChanNOWWW commented Sep 5, 2023

SELECT * FROM infer_schema(location => 'fs:///home/...'); -- or other locations

This command would panic when I tried it. Was it fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature Category: feature
Projects
None yet
Development

No branches or pull requests

2 participants