You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "viirya (via GitHub)" <gi...@apache.org> on 2023/03/24 16:23:55 UTC
[GitHub] [arrow-datafusion] viirya commented on a diff in pull request #5710: Fix parquet pruning when column names have periods
viirya commented on code in PR #5710:
URL: https://github.com/apache/arrow-datafusion/pull/5710#discussion_r1147806697
##########
datafusion/core/tests/parquet/mod.rs:
##########
@@ -454,6 +455,25 @@ fn make_date_batch(offset: Duration) -> RecordBatch {
.unwrap()
}
+/// returns a batch with two columns (note "service.name" is the name
+/// of the column. It is *not* a table named service.name
+///
+/// name | service.name
+fn make_names_batch(name: &str, service_name_values: Vec<&str>) -> RecordBatch {
+ let num_rows = service_name_values.len();
+ let name: StringArray = std::iter::repeat(Some(name)).take(num_rows).collect();
+ let service_name: StringArray = service_name_values.iter().map(Some).collect();
+
+ let schema = Schema::new(vec![
+ Field::new("name", name.data_type().clone(), true),
+ // note the column name has a period in it!
+ Field::new("service.name", service_name.data_type().clone(), true),
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