You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "Jackie-Jiang (via GitHub)" <gi...@apache.org> on 2026/10/20 22:04:07 UTC
[PR] Add null-ignoring variants of array union, concat and push scalar functions [pinot]
Jackie-Jiang opened a new pull request, #19981:
URL: https://github.com/apache/pinot/pull/19981
## Summary
The array scalar functions that combine inputs return `NULL` as soon as any argument is `NULL`. This adds `*IgnoreNulls` variants that skip a `NULL` argument instead:
- `arrayUnionIntIgnoreNulls`, `arrayUnionStringIgnoreNulls`
- `arrayConcat{Int,Long,Float,Double,String}IgnoreNulls`
- `arrayPushBack{Int,Long,Float,Double,String}IgnoreNulls`
- `arrayPushFront{Int,Long,Float,Double,String}IgnoreNulls`
Semantics (SQL names follow the usual snake case, e.g. `array_concat_int_ignore_nulls`):
- A `NULL` array is ignored: `arrayConcatIntIgnoreNulls(a, NULL)` returns `a`, and `arrayUnionIntIgnoreNulls(a, NULL)` returns the distinct values of `a`.
- A `NULL` element is not added: `arrayPushBackIntIgnoreNulls(a, NULL)` returns `a`, and `arrayPushBackIntIgnoreNulls(NULL, 7)` returns `[7]`.
- The result is `NULL` only when every input is `NULL`, matching PostgreSQL `array_cat`.
The functions are declared with `nullableParameters = true` and annotated `@Nullable`, so the multi-stage engine infers a nullable return type.
## Limitations
The single-stage engine does not honor `nullableParameters` today: with null handling enabled, `ScalarTransformFunctionWrapper` passes default values for null rows and marks the result null whenever any argument is null (its null-aware path was removed in #11008). In that mode these functions behave like the existing ones; this will be addressed in a separate PR. They work as described in the multi-stage engine and in ingestion transforms.
`all-functions.yaml` is updated by hand, since `UdfTest`, which generates and checks it, is currently excluded from CI.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Add null-ignoring variants of array union, concat and push scalar functions [pinot]
Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang merged PR #19981:
URL: https://github.com/apache/pinot/pull/19981
--
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: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Add null-ignoring variants of array union, concat and push scalar functions [pinot]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #19981:
URL: https://github.com/apache/pinot/pull/19981#issuecomment-6305157522
## [Codecov](https://app.codecov.io/gh/apache/pinot/pull/19981?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 100.00%. Comparing base ([`607576c`](https://app.codecov.io/gh/apache/pinot/commit/607576c7a8b6ea19dd7eda2e5614701738d1db1c?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`0bbafef`](https://app.codecov.io/gh/apache/pinot/commit/0bbafef42f8a14225d983b2e0221817cf697ee38?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 master.
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #19981 +/- ##
==============================================
+ Coverage 58.90% 100.00% +41.09%
+ Complexity 7 6 -1
==============================================
Files 2733 3 -2730
Lines 171798 6 -171792
Branches 28310 0 -28310
==============================================
- Hits 101196 6 -101190
+ Misses 62036 0 -62036
+ Partials 8566 0 -8566
```
| [Flag](https://app.codecov.io/gh/apache/pinot/pull/19981/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [integration](https://app.codecov.io/gh/apache/pinot/pull/19981/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `100.00% <ø> (ø)` | |
| [integration1](https://app.codecov.io/gh/apache/pinot/pull/19981/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `100.00% <ø> (ø)` | |
| [integration2](https://app.codecov.io/gh/apache/pinot/pull/19981/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [java-25](https://app.codecov.io/gh/apache/pinot/pull/19981/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `100.00% <ø> (+41.09%)` | :arrow_up: |
| [lane-a](https://app.codecov.io/gh/apache/pinot/pull/19981/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `100.00% <ø> (ø)` | |
| [lane-b](https://app.codecov.io/gh/apache/pinot/pull/19981/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `0.00% <ø> (ø)` | |
| [temurin](https://app.codecov.io/gh/apache/pinot/pull/19981/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `100.00% <ø> (+41.09%)` | :arrow_up: |
| [unittests](https://app.codecov.io/gh/apache/pinot/pull/19981/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [unittests1](https://app.codecov.io/gh/apache/pinot/pull/19981/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/pinot/pull/19981?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>
- :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: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Add null-ignoring variants of array union, concat and push scalar functions [pinot]
Posted by "xiangfu0 (via GitHub)" <gi...@apache.org>.
xiangfu0 commented on PR #19981:
URL: https://github.com/apache/pinot/pull/19981#issuecomment-6308483923
Documentation follow-up merged: https://github.com/pinot-contrib/pinot-docs/pull/1126 — lists null-ignoring union, concat and push variants, supported types, null semantics and engine compatibility.
--
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: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org