You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2023/04/11 18:14:41 UTC
[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #5926: test: add infer schema with limit test for csv
alamb commented on code in PR #5926:
URL: https://github.com/apache/arrow-datafusion/pull/5926#discussion_r1163171648
##########
datafusion/core/src/datasource/file_format/csv.rs:
##########
@@ -385,6 +387,46 @@ mod tests {
Ok(())
}
+ #[tokio::test]
+ async fn infer_shcmea_with_limit() {
+ let session = SessionContext::new();
+ let ctx = session.state();
+ let store = Arc::new(LocalFileSystem::new()) as _;
+ let filename = "tests/csv/schema_infer_limit.csv";
+ let format = CsvFormat::default().with_schema_infer_max_rec(Some(3));
+
+ let file_schema = format
+ .infer_schema(&ctx, &store, &[local_unpartitioned_file(filename)])
+ .await
+ .expect("Schema inference");
Review Comment:
Can you explain why you chose to add this test? I think this feature is already covered by existing tests.
I see the test `infer_schema` above this that has a limit of `Some(1)`.
Which should call infer schema as part of its execution.
##########
datafusion/core/src/datasource/file_format/csv.rs:
##########
@@ -385,6 +387,46 @@ mod tests {
Ok(())
}
+ #[tokio::test]
+ async fn infer_shcmea_with_limit() {
Review Comment:
```suggestion
async fn infer_schema_with_limit() {
```
--
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