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

   ## What is the purpose of the change
   Introduce Built-in Function to Access field or element in the Variant
   
   SQL Function | Table Function | Description
   -- | -- | --
   variant ‘[’ INT ‘]’ | VARIANT.at(INT) | If the VARIANT is an ARRAY value, 
returns a VARIANT whose value is the element at the specified index. Otherwise, 
this operation returns NULL
   variant ‘[’ STRING ‘]’ | VARIANT.at(STRING) | If the VARIANT is a MAP value 
that has an element with this key, a VARIANT holding the associated value is 
returned. Otherwise, NULL is returned.
   
   
   
   
   ## Brief change log
   
   - **Support accessing VARIANT elements using [INT] or VARIANT.at(INT) when 
the VARIANT contains an ARRAY value in SQL or table expressions.**
   - **Support accessing VARIANT elements using ['STRING'] or 
VARIANT.at('STRING') when the VARIANT contains a MAP value in SQL or table 
expressions.**
   
   
   ## Verifying this change
   
   This change added tests and can be verified as follows:
   
     - *Added six new test at 
`org.apache.flink.table.planner.plan.nodes.exec.stream.VariantSemanticTest`*
   
   ## 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)
   


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