You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/09/25 15:54:44 UTC
[GitHub] [arrow-datafusion] xudong963 opened a new pull request #1050: Support querying CSV files without providing the schema
xudong963 opened a new pull request #1050:
URL: https://github.com/apache/arrow-datafusion/pull/1050
# Which issue does this PR close?
Closes #888
# Rationale for this change
<!--
Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.
-->
# What changes are included in this PR?
<!--
There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
-->
# Are there any user-facing changes?
<!--
If there are user-facing changes then we may require documentation to be updated before approving the PR.
-->
<!--
If there are any breaking changes to public APIs, please add the `api change` label.
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] xudong963 commented on pull request #1050: Support querying CSV files without providing the schema
Posted by GitBox <gi...@apache.org>.
xudong963 commented on pull request #1050:
URL: https://github.com/apache/arrow-datafusion/pull/1050#issuecomment-927140739
@houqp @alamb PTAL, thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] alamb commented on a change in pull request #1050: Support querying CSV files without providing the schema
Posted by GitBox <gi...@apache.org>.
alamb commented on a change in pull request #1050:
URL: https://github.com/apache/arrow-datafusion/pull/1050#discussion_r716193375
##########
File path: datafusion/src/sql/planner.rs
##########
@@ -196,13 +196,7 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
// semantic checks
match *file_type {
- FileType::CSV => {
Review comment:
❤️
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] xudong963 commented on a change in pull request #1050: Support querying CSV files without providing the schema
Posted by GitBox <gi...@apache.org>.
xudong963 commented on a change in pull request #1050:
URL: https://github.com/apache/arrow-datafusion/pull/1050#discussion_r716133547
##########
File path: datafusion/src/physical_plan/csv.rs
##########
@@ -263,12 +264,20 @@ impl CsvExec {
filenames: &[String],
options: &CsvReadOptions,
) -> Result<Schema> {
- Ok(csv::infer_schema_from_files(
- filenames,
- options.delimiter,
- Some(options.schema_infer_max_records),
- options.has_header,
- )?)
+ let mut schemas = Vec::new();
+ for filename in filenames {
Review comment:
Good sight! I deep into `csv::infer_schema_from_files` and find them nearly do the same thing.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] alamb merged pull request #1050: Support querying CSV files without providing the schema
Posted by GitBox <gi...@apache.org>.
alamb merged pull request #1050:
URL: https://github.com/apache/arrow-datafusion/pull/1050
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] houqp commented on a change in pull request #1050: Support querying CSV files without providing the schema
Posted by GitBox <gi...@apache.org>.
houqp commented on a change in pull request #1050:
URL: https://github.com/apache/arrow-datafusion/pull/1050#discussion_r716091636
##########
File path: datafusion/src/physical_plan/csv.rs
##########
@@ -263,12 +264,20 @@ impl CsvExec {
filenames: &[String],
options: &CsvReadOptions,
) -> Result<Schema> {
- Ok(csv::infer_schema_from_files(
- filenames,
- options.delimiter,
- Some(options.schema_infer_max_records),
- options.has_header,
- )?)
+ let mut schemas = Vec::new();
+ for filename in filenames {
Review comment:
what's the reason for reimplementing `csv::infer_schema_from_files` here?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] houqp commented on a change in pull request #1050: Support querying CSV files without providing the schema
Posted by GitBox <gi...@apache.org>.
houqp commented on a change in pull request #1050:
URL: https://github.com/apache/arrow-datafusion/pull/1050#discussion_r716139368
##########
File path: datafusion/tests/user_defined_plan.rs
##########
@@ -109,6 +109,22 @@ async fn setup_table(mut ctx: ExecutionContext) -> Result<ExecutionContext> {
Ok(ctx)
}
+async fn setup_table_without_columns(
Review comment:
i think without schema would have been more accurate here. same for the other tests.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] xudong963 commented on a change in pull request #1050: Support querying CSV files without providing the schema
Posted by GitBox <gi...@apache.org>.
xudong963 commented on a change in pull request #1050:
URL: https://github.com/apache/arrow-datafusion/pull/1050#discussion_r716144757
##########
File path: datafusion/tests/user_defined_plan.rs
##########
@@ -109,6 +109,22 @@ async fn setup_table(mut ctx: ExecutionContext) -> Result<ExecutionContext> {
Ok(ctx)
}
+async fn setup_table_without_columns(
Review comment:
good idea! fixed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org