You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "jonathanc-n (via GitHub)" <gi...@apache.org> on 2024/11/12 02:15:46 UTC

[PR] feat: Support `Utf8View` for `get_wider_type` + `binary_to_string_coercion` functions [datafusion]

jonathanc-n opened a new pull request, #13370:
URL: https://github.com/apache/datafusion/pull/13370

   ## Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
   -->
   
   Closes #13361 and #13360.
   
   ## Rationale for this change
   <!--
    Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.  
   -->
   
   ## What changes are included in this PR?
   Added string view to functions
   <!--
   There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   ## Are these changes tested?
   
   <!--
   We typically require tests for all PRs in order to:
   1. Prevent the code from being accidentally broken by subsequent changes
   2. Serve as another way to document the expected behavior of the code
   
   If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
   -->
   
   ## Are there any user-facing changes?
   
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   <!--
   If there are any breaking changes to public APIs, please add the `api change` label.
   -->
   


-- 
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@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Support `Utf8View` for `get_wider_type` + `binary_to_string_coercion` functions [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #13370:
URL: https://github.com/apache/datafusion/pull/13370#issuecomment-2655005676

   I think we have merged all relevant parts of this PR so closing this one


-- 
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@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Support `Utf8View` for `get_wider_type` + `binary_to_string_coercion` functions [datafusion]

Posted by "jayzhan211 (via GitHub)" <gi...@apache.org>.
jayzhan211 commented on code in PR #13370:
URL: https://github.com/apache/datafusion/pull/13370#discussion_r1844725551


##########
datafusion/expr-common/src/type_coercion/binary.rs:
##########
@@ -1550,6 +1552,62 @@ mod tests {
         );
     }
 
+    #[test]
+    fn test_get_wider_type_with_utf8view() {
+        assert_eq!(

Review Comment:
   I mean `binary_to_string_coercion `



-- 
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@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Support `Utf8View` for `get_wider_type` + `binary_to_string_coercion` functions [datafusion]

Posted by "Omega359 (via GitHub)" <gi...@apache.org>.
Omega359 commented on PR #13370:
URL: https://github.com/apache/datafusion/pull/13370#issuecomment-2616723906

   Yes, I think that's about it @alamb. @jonathanc-n are you able to handle this?


-- 
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@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Support `Utf8View` for `get_wider_type` + `binary_to_string_coercion` functions [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #13370:
URL: https://github.com/apache/datafusion/pull/13370#issuecomment-2620024194

   Thank you ! I am just running around madly now trying to get outstanding issues in for the release


-- 
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@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Support `Utf8View` for `get_wider_type` + `binary_to_string_coercion` functions [datafusion]

Posted by "Omega359 (via GitHub)" <gi...@apache.org>.
Omega359 commented on code in PR #13370:
URL: https://github.com/apache/datafusion/pull/13370#discussion_r1843956046


##########
datafusion/expr-common/src/type_coercion/binary.rs:
##########
@@ -1550,6 +1552,62 @@ mod tests {
         );
     }
 
+    #[test]
+    fn test_get_wider_type_with_utf8view() {
+        assert_eq!(

Review Comment:
   I think get_wider_type is actually only used by ArrayConcat
   
   ![image](https://github.com/user-attachments/assets/1c86bf92-df63-4268-a187-4dd982fc1c4f)
   



-- 
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@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Support `Utf8View` for `get_wider_type` + `binary_to_string_coercion` functions [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #13370:
URL: https://github.com/apache/datafusion/pull/13370#discussion_r1936327292


##########
datafusion/expr-common/src/type_coercion/binary.rs:
##########
@@ -1172,16 +1174,22 @@ fn binary_to_string_coercion(
     match (lhs_type, rhs_type) {
         (Binary, Utf8) => Some(Utf8),
         (Binary, LargeUtf8) => Some(LargeUtf8),
+        (Binary, Utf8View) => Some(Utf8View),

Review Comment:
   These rules would allow running `binary like utf8view` -- do we have a usecase for that? We could write tests for it, but I don't think it would be widely used 🤔 



-- 
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@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Support `Utf8View` for `get_wider_type` + `binary_to_string_coercion` functions [datafusion]

Posted by "jayzhan211 (via GitHub)" <gi...@apache.org>.
jayzhan211 commented on PR #13370:
URL: https://github.com/apache/datafusion/pull/13370#issuecomment-2469462575

   Same with this, I would expect test that failed if the change is reverted


-- 
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@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Support `Utf8View` for `get_wider_type` + `binary_to_string_coercion` functions [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #13370:
URL: https://github.com/apache/datafusion/pull/13370#issuecomment-2598934705

   We just updated to a version of arrow-rs that I think has the necessary changes:
   - https://github.com/apache/datafusion/pull/14153
   (thanks @Owen-CH-Leung )


-- 
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@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Support `Utf8View` for `get_wider_type` + `binary_to_string_coercion` functions [datafusion]

Posted by "jonathanc-n (via GitHub)" <gi...@apache.org>.
jonathanc-n commented on PR #13370:
URL: https://github.com/apache/datafusion/pull/13370#issuecomment-2616874364

   @Omega359 @alamb Yes i should be able to wrap this up in the next few days


-- 
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@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Support `Utf8View` for `get_wider_type` + `binary_to_string_coercion` functions [datafusion]

Posted by "Omega359 (via GitHub)" <gi...@apache.org>.
Omega359 commented on code in PR #13370:
URL: https://github.com/apache/datafusion/pull/13370#discussion_r1844050581


##########
datafusion/expr-common/src/type_coercion/binary.rs:
##########
@@ -1544,6 +1552,59 @@ mod tests {
         );
     }
 
+    #[test]
+    fn test_get_wider_type_with_utf8view() {
+        assert_eq!(
+            get_wider_type(&DataType::Utf8View, &DataType::Utf8View).unwrap(),
+            DataType::Utf8View
+        );
+
+        assert_eq!(
+            get_wider_type(&DataType::Utf8View, &DataType::Utf8).unwrap(),
+            DataType::Utf8View
+        );
+
+        assert_eq!(
+            get_wider_type(&DataType::Utf8View, &DataType::LargeUtf8).unwrap(),
+            DataType::LargeUtf8
+        );
+
+        assert_eq!(
+            get_wider_type(&DataType::Utf8View, &DataType::Null).unwrap(),
+            DataType::Utf8View
+        );
+
+        assert!(get_wider_type(&DataType::Utf8View, &DataType::Int32).is_err());
+    }
+
+    #[test]
+    fn test_binary_to_string_coercion_with_utf8view() {
+        assert_eq!(
+            binary_to_string_coercion(&DataType::Binary, &DataType::Utf8View),
+            Some(DataType::Utf8View)
+        );
+        assert_eq!(
+            binary_to_string_coercion(&DataType::Utf8View, &DataType::Binary),
+            Some(DataType::Utf8View)
+        );
+        assert_eq!(
+            binary_to_string_coercion(&DataType::BinaryView, &DataType::Utf8View),
+            Some(DataType::Utf8View)
+        );
+        assert_eq!(
+            binary_to_string_coercion(&DataType::Utf8View, &DataType::LargeBinary),
+            Some(DataType::LargeUtf8)
+        );
+        assert_eq!(
+            binary_to_string_coercion(&DataType::LargeBinary, &DataType::Utf8View),
+            Some(DataType::Utf8View)

Review Comment:
   this is incorrect, it should be LargeUtf8 I think.



-- 
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@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Support `Utf8View` for `get_wider_type` + `binary_to_string_coercion` functions [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb closed pull request #13370: feat: Support `Utf8View` for `get_wider_type` + `binary_to_string_coercion`  functions
URL: https://github.com/apache/datafusion/pull/13370


-- 
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@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Support `Utf8View` for `get_wider_type` + `binary_to_string_coercion` functions [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #13370:
URL: https://github.com/apache/datafusion/pull/13370#discussion_r1936379694


##########
datafusion/expr-common/src/type_coercion/binary.rs:
##########
@@ -1550,6 +1552,62 @@ mod tests {
         );
     }
 
+    #[test]
+    fn test_get_wider_type_with_utf8view() {
+        assert_eq!(

Review Comment:
   See 
   -  https://github.com/apache/datafusion/pull/14378 



-- 
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@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Support `Utf8View` for `get_wider_type` + `binary_to_string_coercion` functions [datafusion]

Posted by "jonathanc-n (via GitHub)" <gi...@apache.org>.
jonathanc-n commented on code in PR #13370:
URL: https://github.com/apache/datafusion/pull/13370#discussion_r1841357105


##########
datafusion/expr-common/src/type_coercion/binary.rs:
##########
@@ -1550,6 +1552,62 @@ mod tests {
         );
     }
 
+    #[test]
+    fn test_get_wider_type_with_utf8view() {
+        assert_eq!(

Review Comment:
   @jayzhan211 Correct me if I'm wrong, but this seems to be a problem with arrow casting from numerics to utf8view, the same can be said for this, #13366. However correct me if I'm wrong, I can't seem to find a sql query that triggers it, although i believe there should be one



-- 
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@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Support `Utf8View` for `get_wider_type` + `binary_to_string_coercion` functions [datafusion]

Posted by "jonathanc-n (via GitHub)" <gi...@apache.org>.
jonathanc-n commented on code in PR #13370:
URL: https://github.com/apache/datafusion/pull/13370#discussion_r1841357105


##########
datafusion/expr-common/src/type_coercion/binary.rs:
##########
@@ -1550,6 +1552,62 @@ mod tests {
         );
     }
 
+    #[test]
+    fn test_get_wider_type_with_utf8view() {
+        assert_eq!(

Review Comment:
   @jayzhan211 Correct me if I'm wrong, but this seems to be a problem with arrow casting from numerics to utf8view, the same can be said for this, #13366. However correct me if I'm wrong, I can't seem to find a sql query that triggers it.



-- 
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@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Support `Utf8View` for `get_wider_type` + `binary_to_string_coercion` functions [datafusion]

Posted by "jayzhan211 (via GitHub)" <gi...@apache.org>.
jayzhan211 commented on code in PR #13370:
URL: https://github.com/apache/datafusion/pull/13370#discussion_r1837480917


##########
datafusion/expr-common/src/type_coercion/binary.rs:
##########
@@ -1550,6 +1552,62 @@ mod tests {
         );
     }
 
+    #[test]
+    fn test_get_wider_type_with_utf8view() {
+        assert_eq!(

Review Comment:
   Not this kind of test, but a valid sql query that goes through the coercion function



-- 
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@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Support `Utf8View` for `get_wider_type` + `binary_to_string_coercion` functions [datafusion]

Posted by "jayzhan211 (via GitHub)" <gi...@apache.org>.
jayzhan211 commented on code in PR #13370:
URL: https://github.com/apache/datafusion/pull/13370#discussion_r1841592484


##########
datafusion/expr-common/src/type_coercion/binary.rs:
##########
@@ -1550,6 +1552,62 @@ mod tests {
         );
     }
 
+    #[test]
+    fn test_get_wider_type_with_utf8view() {
+        assert_eq!(

Review Comment:
   It seems only `like_coercion` utilize this coercion. I think current coercion is unnecessary complex for `like` operator



-- 
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@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Support `Utf8View` for `get_wider_type` + `binary_to_string_coercion` functions [datafusion]

Posted by "jonathanc-n (via GitHub)" <gi...@apache.org>.
jonathanc-n closed pull request #13370: feat: Support `Utf8View` for `get_wider_type` + `binary_to_string_coercion`  functions
URL: https://github.com/apache/datafusion/pull/13370


-- 
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@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Support `Utf8View` for `get_wider_type` + `binary_to_string_coercion` functions [datafusion]

Posted by "Omega359 (via GitHub)" <gi...@apache.org>.
Omega359 commented on code in PR #13370:
URL: https://github.com/apache/datafusion/pull/13370#discussion_r1844054265


##########
datafusion/expr-common/src/type_coercion/binary.rs:
##########
@@ -1172,16 +1174,22 @@ fn binary_to_string_coercion(
     match (lhs_type, rhs_type) {
         (Binary, Utf8) => Some(Utf8),
         (Binary, LargeUtf8) => Some(LargeUtf8),
+        (Binary, Utf8View) => Some(Utf8View),
         (BinaryView, Utf8) => Some(Utf8View),
         (BinaryView, LargeUtf8) => Some(LargeUtf8),
+        (BinaryView, Utf8View) => Some(Utf8View),
         (LargeBinary, Utf8) => Some(LargeUtf8),
         (LargeBinary, LargeUtf8) => Some(LargeUtf8),
+        (LargeBinary, Utf8View) => Some(Utf8View),

Review Comment:
   This is incorrect, it should be LargeUtf8



-- 
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@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Support `Utf8View` for `get_wider_type` + `binary_to_string_coercion` functions [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #13370:
URL: https://github.com/apache/datafusion/pull/13370#issuecomment-2616122611

   Is the state of this PR that we need to write some more tests?


-- 
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@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Support `Utf8View` for `get_wider_type` + `binary_to_string_coercion` functions [datafusion]

Posted by "jonathanc-n (via GitHub)" <gi...@apache.org>.
jonathanc-n commented on PR #13370:
URL: https://github.com/apache/datafusion/pull/13370#issuecomment-2499260072

   @alamb I also believe that this one is also waiting on numeric to utf8view coercion pr in arrow-rs, correct me if I'm wrong though.


-- 
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@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Support `Utf8View` for `get_wider_type` + `binary_to_string_coercion` functions [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #13370:
URL: https://github.com/apache/datafusion/pull/13370#issuecomment-2499103831

   I am trying to clean up the review backlog -- what is the status of this PR? 
   
   It seems like it is waiting on an end to end (e.g. sql or dataframe test) that actually has a problem / doesn't run without this PR but does run with it
   
   I played around with it and I think I came up with one:
   
   ```sql
   > create or replace table foo as select arrow_cast('1', 'Utf8View') as c;
   0 row(s) fetched.
   Elapsed 0.002 seconds.
   
   > select c from foo;
   +---+
   | c |
   +---+
   | 1 |
   +---+
   1 row(s) fetched.
   Elapsed 0.001 seconds.
   
   > select c = 1 from foo;
   Error during planning: Cannot infer common argument type for comparison operation Utf8View = Int64
   ```
   
   But it works for strings:
   
   ```sql
   > create or replace table foo as select arrow_cast('1', 'Utf8') as c;
   0 row(s) fetched.
   Elapsed 0.002 seconds.
   
   > select c = 1 from foo;
   +------------------+
   | foo.c = Int64(1) |
   +------------------+
   | true             |
   +------------------+
   1 row(s) fetched.
   Elapsed 0.002 seconds.
   ```
   
   Looks like we need to test with `Utf8` + `Utf8View` (aka string concat)
   
   Also since the argument type order is important, also in both directions
   
   Does that make sense @jonathanc-n ?
   
   Thank you for your help


-- 
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@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org