You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "jackylee-ch (via GitHub)" <gi...@apache.org> on 2026/09/24 08:07:08 UTC

[PR] fix: document empty() as returning a boolean, not 1/0 [datafusion]

jackylee-ch opened a new pull request, #25697:
URL: https://github.com/apache/datafusion/pull/25697

   ## Which issue does this PR close?
   
   - N/A
   
   ## Rationale for this change
   
   `empty`'s docs say it "Returns 1 for an empty array or 0 for a non-empty array" and show `select empty([1])` returning `0`. But `empty` returns a boolean (`return_type` is `Boolean`); `array/array_empty.slt` shows `empty(make_array(1))` is `false`. Following the docs (`empty(...) = 1`) fails to plan with `Cannot infer common argument type Boolean = Int64`.
   
   ## What changes are included in this PR?
   
   Corrects the description and `sql_example` to return `false`, and regenerates `scalar_functions.md`.
   
   ## What is the testing strategy for this PR?
   
   Docs only; behaviour is unchanged and already covered by `array/array_empty.slt` (`empty(make_array(1))` → `false`).
   
   ## Are there any user-facing changes?
   
   The SQL reference for `empty` (and aliases `array_empty`/`list_empty`) is now correct. No API change.
   


-- 
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] fix: document empty() as returning a boolean, not 1/0 [datafusion]

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

   ## [Codecov](https://app.codecov.io/gh/apache/datafusion/pull/25697?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 82.49%. Comparing base ([`95bb0a0`](https://app.codecov.io/gh/apache/datafusion/commit/95bb0a0dfa48ca20d017faa55b2fc96ee2f300fe?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`7de9257`](https://app.codecov.io/gh/apache/datafusion/commit/7de925795946e7ab85d57c5b3705eccd9e37d1bb?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 4 commits behind head on main.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@           Coverage Diff           @@
   ##             main   #25697   +/-   ##
   =======================================
     Coverage   82.48%   82.49%           
   =======================================
     Files        1140     1140           
     Lines      437614   437675   +61     
     Branches   437614   437675   +61     
   =======================================
   + Hits       360986   361042   +56     
   - Misses      54834    54837    +3     
   - Partials    21794    21796    +2     
   ```
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/datafusion/pull/25697?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
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] fix: document empty() as returning a boolean, not 1/0 [datafusion]

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


-- 
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] fix: document empty() as returning a boolean, not 1/0 [datafusion]

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

   thanks @jackylee-ch & @martin-g 


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