You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2024/11/29 13:19:35 UTC

[PR] Test for string / numeric coercion [datafusion]

alamb opened a new pull request, #13606:
URL: https://github.com/apache/datafusion/pull/13606

   ## Which issue does this PR close?
   
   
   - Part of https://github.com/apache/datafusion/issues/13359
   
   ## Rationale for this change
   
   While testing https://github.com/apache/datafusion/pull/13366 I found there are still some gaps with StringView:
   
   ## What changes are included in this PR?
   
   Add tests for string coercsion to integer. They currently fail as arrow-rs doesn't suport int --> StringView casting at the moment
   
   ## 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] Test for string / numeric coercion [datafusion]

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


##########
datafusion/sqllogictest/test_files/string/string_query.slt.part:
##########
@@ -35,6 +39,41 @@ _ \_ (empty) (empty)
 NULL % NULL NULL
 NULL R NULL 🔥
 
+# --------------------------------------
+# test type coercion (compare to int)
+# queries should not error
+# --------------------------------------
+
+query BB
+select ascii_1 = 1 as col1, ascii_1 = 1 as col2 from test_basic_operator;

Review Comment:
   it was a mistake -- I meant to do the comparison the other way



-- 
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] Test for string / numeric coercion [datafusion]

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

   - Superceded by https://github.com/apache/datafusion/pull/14377


-- 
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] Test for string / numeric coercion [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb closed pull request #13606: Test for string / numeric coercion
URL: https://github.com/apache/datafusion/pull/13606


-- 
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] Test for string / numeric coercion [datafusion]

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

   > fyi [apache/arrow-rs#6714](https://github.com/apache/arrow-rs/issues/6714) was resolved recently.
   
   Awesome -- thank you 
   
   I have it on my list to double check if we need any additional work (like timestamp --> Utf8View)
   
   I just haven't found the time yet to write the corresponding tests to verify in DataFusion. Hoping to be able to do so this week


-- 
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] Test for string / numeric coercion [datafusion]

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

   fyi https://github.com/apache/arrow-rs/issues/6714 was resolved recently.


-- 
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] Test for string / numeric coercion [datafusion]

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


##########
datafusion/sqllogictest/test_files/string/string_query.slt.part:
##########
@@ -35,6 +39,41 @@ _ \_ (empty) (empty)
 NULL % NULL NULL
 NULL R NULL 🔥
 
+# --------------------------------------
+# test type coercion (compare to int)
+# queries should not error
+# --------------------------------------
+
+query BB
+select ascii_1 = 1 as col1, ascii_1 = 1 as col2 from test_basic_operator;

Review Comment:
   why is `ascii_1 = 1` projected twice?
   
   (same for `ascii_1 <> 1` case below)



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