aviralgarg05 commented on code in PR #19890:
URL: https://github.com/apache/datafusion/pull/19890#discussion_r2711942743
##########
datafusion/core/tests/parquet/page_pruning.rs:
##########
@@ -961,3 +964,56 @@ fn cast_count_metric(metric: MetricValue) -> Option<usize>
{
_ => None,
}
}
+
+#[tokio::test]
+async fn test_parquet_opener_without_page_index() {
+ // Defines a simple schema and batch
+ let schema = Arc::new(Schema::new(vec![Field::new("a", DataType::Int32,
true)]));
+ let batch = RecordBatch::try_new(
+ schema.clone(),
+ vec![Arc::new(Int32Array::from(vec![1, 2, 3]))],
+ )
+ .unwrap();
+
+ // Create a temp file
+ let file = tempfile::Builder::new()
+ .suffix(".parquet")
+ .tempfile()
+ .unwrap();
+ let path = file.path().to_str().unwrap().to_string();
+
+ // Write parquet WITHOUT page index
+ let props = WriterProperties::builder().build();
Review Comment:
I checked the available `WriterProperties` builder methods in the current
`parquet` crate version used here. It seems explicit methods to disable page
index writing aren't readily exposed or consistent with `set_write_page_index`.
Since the default `WriterProperties::builder().build()` correctly produces a
file without the page index (as confirmed by the test failure before the fix),
I've relied on this default behavior.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]