raminqaf opened a new pull request, #29805:
URL: https://github.com/apache/flink/pull/29805

   ## What is the purpose of the change
   
   Backport of #29628 to release-2.4. `JSON_LENGTH` (FLINK-40089) and 
`JSON_TYPE` (FLINK-40268) are new in 2.4. Without this commit, 2.4.0 ships them 
with path functions that fail the job instead of returning NULL:
   
   | `f0`         | Query                         | release-2.4 today           
                                                                | With this 
commit |
   
|--------------|-------------------------------|---------------------------------------------------------------------------------------------|------------------|
   | `[]`         | `JSON_LENGTH(f0, '$.min()')`  | `JsonPathException: 
Aggregation function attempted to calculate value using empty array`   | NULL   
          |
   | `{"a": []}`  | `JSON_TYPE(f0, '$.a.avg()')`  | the same exception          
                                                                | NULL          
   |
   
   ## Brief change log
   
     - Cherry-pick of 44131db0b9c, applied without conflicts
   
   ## Verifying this change
   
   `JsonFunctionsITCase` passes on this branch.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): no
     - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: no
     - The serializers: no
     - The runtime per-record code paths (performance sensitive): no
     - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
     - The S3 file system connector: no
   
   ## Documentation
   
     - Does this pull request introduce a new feature? no
     - If yes, how is the feature documented? not applicable. The `JSON_LENGTH` 
and `JSON_TYPE` docs list the new NULL case, see the release note on 
FLINK-41086.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes (please specify the tool below)
   
   Generated-by: Claude Code 2.1.319 (Claude Opus 5.5)
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to