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

[PR] Move bit_and_or_xor unit tests to slt [datafusion]

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

   ## Which issue does this PR close?
   
   part of #10384 
   
   
   ## Rationale for this change
   
   
   ## What changes are included in this PR?
   
   
   ## Are these changes tested?
   
   ## Are there any user-facing changes?
   


-- 
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] Move bit_and_or_xor unit tests to slt [datafusion]

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

   @Jefffrey Thank you for the review, I added a new commit which adds the missing distinct for the type


-- 
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] Move bit_and_or_xor unit tests to slt [datafusion]

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

   Thanks @NoeB and @Jefffrey 


-- 
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] Move bit_and_or_xor unit tests to slt [datafusion]

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


##########
datafusion/sqllogictest/test_files/aggregate.slt:
##########
@@ -2285,6 +2285,201 @@ ORDER BY tag
 33 11 NULL 33 11 NULL 33 11 NULL B
 
 
+# bit_and_i32
+statement ok
+create table t (c int) as values (4), (7), (15);
+
+query IT
+Select bit_and(c), arrow_typeof(bit_and(c))  from t;
+----
+4 Int32
+
+statement ok
+drop table t;
+
+# bit_and_i32_with_nulls
+statement ok
+create table t (c int) as values (1), (NULL), (3), (5);
+
+query IT
+Select bit_and(c), arrow_typeof(bit_and(c)) from t;
+----
+1 Int32
+
+statement ok
+drop table t;
+
+# bit_and_i32_all_nulls
+statement ok
+create table t (c int) as values (NULL), (NULL);
+
+query IT
+Select bit_and(c), arrow_typeof(bit_and(c)) from t;
+----
+NULL Int32
+
+statement ok
+drop table t;
+
+# bit_and_u32
+statement ok
+create table t (c int unsigned) as values (4), (7), (15);
+
+query IT
+Select bit_and(c), arrow_typeof(bit_and(c)) from t;
+----
+4 UInt32
+
+statement ok
+drop table t;
+
+# bit_or_i32
+statement ok
+create table t (c int) as values (4), (7), (15);
+
+query IT
+Select bit_or(c), arrow_typeof(bit_or(c))  from t;
+----
+15 Int32
+
+statement ok
+drop table t;
+
+# bit_or_i32_with_nulls
+statement ok
+create table t (c int) as values (1), (NULL), (3), (5);
+
+query IT
+Select bit_or(c), arrow_typeof(bit_or(c))  from t;
+----
+7 Int32
+
+statement ok
+drop table t;
+
+#bit_or_i32_all_nulls
+statement ok
+create table t (c int) as values (NULL), (NULL);
+
+query IT
+Select bit_or(c), arrow_typeof(bit_or(c))  from t;
+----
+NULL Int32
+
+statement ok
+drop table t;
+
+
+#bit_or_u32
+statement ok
+create table t (c int unsigned) as values (4), (7), (15);
+
+query IT
+Select bit_or(c), arrow_typeof(bit_or(c))  from t;
+----
+15 UInt32
+
+statement ok
+drop table t;
+
+#bit_xor_i32
+statement ok
+create table t (c int) as values (4), (7), (4), (7), (15);
+
+query IT
+Select bit_xor(c), arrow_typeof(bit_xor(c))  from t;
+----
+15 Int32
+
+statement ok
+drop table t;
+
+# bit_xor_i32_with_nulls
+statement ok
+create table t (c int) as values (1), (1), (NULL), (3), (5);
+
+query IT
+Select bit_xor(c), arrow_typeof(bit_xor(c))  from t;
+----
+6 Int32
+
+statement ok
+drop table t;
+
+# bit_xor_i32_all_nulls
+statement ok
+create table t (c int) as values (NULL), (NULL);
+
+query IT
+Select bit_xor(c), arrow_typeof(bit_xor(c))  from t;
+----
+NULL Int32
+
+statement ok
+drop table t;
+
+# bit_xor_u32
+statement ok
+create table t (c int unsigned) as values (4), (7), (4), (7), (15);
+
+query IT
+Select bit_xor(c), arrow_typeof(bit_xor(c))  from t;
+----
+15 UInt32
+
+statement ok
+drop table t;
+
+# bit_xor_distinct_i32
+statement ok
+create table t (c int) as values (4), (7), (4), (7), (15);
+
+query IT
+Select bit_xor(DISTINCT c), arrow_typeof(bit_xor(c))  from t;

Review Comment:
   ```suggestion
   Select bit_xor(DISTINCT c), arrow_typeof(bit_xor(DISTINCT c))  from t;
   ```
   
   nit: Technically this I think (and same for the below ones)



-- 
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] Move bit_and_or_xor unit tests to slt [datafusion]

Posted by "jayzhan211 (via GitHub)" <gi...@apache.org>.
jayzhan211 merged PR #10457:
URL: https://github.com/apache/datafusion/pull/10457


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