XiangpengHao commented on code in PR #10985:
URL: https://github.com/apache/datafusion/pull/10985#discussion_r1645029809


##########
datafusion/common/src/scalar/mod.rs:
##########
@@ -1715,6 +1715,22 @@ impl ScalarValue {
                 )?;
                 Arc::new(array)
             }
+            DataType::Utf8View => {

Review Comment:
   Maybe just `build_array_string!(StringViewArray, Utf8View)`? 
   Can you also move this case closer to where we handle `Utf8` and `LargeUtf8`?



##########
datafusion/expr/src/type_coercion/binary.rs:
##########
@@ -932,6 +932,7 @@ fn string_coercion(lhs_type: &DataType, rhs_type: 
&DataType) -> Option<DataType>
         (LargeUtf8, Utf8) => Some(LargeUtf8),
         (Utf8, LargeUtf8) => Some(LargeUtf8),
         (LargeUtf8, LargeUtf8) => Some(LargeUtf8),
+        (Utf8View, Utf8View) => Some(Utf8View),

Review Comment:
   Should we handle `(Utf8View, Utf8)`, `(Utf8, Utf8View)` etc?
   It's possible that we read a StringViewArray from parquet, and compare it 
against a `Utf8`. What do you think the result type should look like? @alamb 



-- 
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]

Reply via email to