From 7aec0faa42fce7e4507d601aafcffa5bd41696ea Mon Sep 17 00:00:00 2001 From: Xiangpeng Hao Date: Sat, 21 Sep 2024 16:36:38 -0500 Subject: [PATCH] fix infer statistics for BinaryView types --- datafusion/core/src/datasource/file_format/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/datafusion/core/src/datasource/file_format/mod.rs b/datafusion/core/src/datasource/file_format/mod.rs index a503e36adbeb..60f2b2dcefa9 100644 --- a/datafusion/core/src/datasource/file_format/mod.rs +++ b/datafusion/core/src/datasource/file_format/mod.rs @@ -268,7 +268,9 @@ pub(crate) fn coerce_file_schema_to_view_type( .iter() .map(|f| { let dt = f.data_type(); - if dt.equals_datatype(&DataType::Utf8View) { + if dt.equals_datatype(&DataType::Utf8View) + || dt.equals_datatype(&DataType::BinaryView) + { transform = true; } (f.name(), dt)