You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datafusion.apache.org by bl...@apache.org on 2026/02/06 14:59:29 UTC
(datafusion-sandbox) 40/44: fix: datatype_is_logically_equal for (Dict, Dict)
This is an automated email from the ASF dual-hosted git repository.
blaginin pushed a commit to branch annarose/dict-coercion
in repository https://gitbox.apache.org/repos/asf/datafusion-sandbox.git
commit 5bab65b24e08f26ba70751daa71112176bf59840
Author: Anna-Rose Lescure <an...@datadoghq.com>
AuthorDate: Thu Feb 5 11:57:48 2026 +0100
fix: datatype_is_logically_equal for (Dict, Dict)
---
datafusion/common/src/dfschema.rs | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/datafusion/common/src/dfschema.rs b/datafusion/common/src/dfschema.rs
index de6d87401..0a05622e3 100644
--- a/datafusion/common/src/dfschema.rs
+++ b/datafusion/common/src/dfschema.rs
@@ -698,7 +698,7 @@ impl DFSchema {
// check nested fields
match (dt1, dt2) {
(DataType::Dictionary(_, v1), DataType::Dictionary(_, v2)) => {
- v1.as_ref() == v2.as_ref()
+ Self::datatype_is_logically_equal(v1.as_ref(), v2.as_ref())
}
(DataType::Dictionary(_, v1), othertype)
| (othertype, DataType::Dictionary(_, v1)) => {
@@ -1806,6 +1806,21 @@ mod tests {
&DataType::Utf8View,
&DataType::Dictionary(Box::new(DataType::Int32), Box::new(DataType::Utf8))
));
+
+ assert!(DFSchema::datatype_is_logically_equal(
+ &DataType::Dictionary(
+ Box::new(DataType::Int32),
+ Box::new(DataType::List(
+ Field::new("element", DataType::Utf8, false).into()
+ ))
+ ),
+ &DataType::Dictionary(
+ Box::new(DataType::Int32),
+ Box::new(DataType::List(
+ Field::new("element", DataType::Utf8View, false).into()
+ ))
+ )
+ ));
}
#[test]
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datafusion.apache.org
For additional commands, e-mail: commits-help@datafusion.apache.org