[ 
https://issues.apache.org/jira/browse/FLINK-40963?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hao Li reassigned FLINK-40963:
------------------------------

    Assignee: Saketh Kurnool

> Add support for DATE and TIME conversion to JSON
> ------------------------------------------------
>
>                 Key: FLINK-40963
>                 URL: https://issues.apache.org/jira/browse/FLINK-40963
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table SQL / Planner
>            Reporter: Saketh Kurnool
>            Assignee: Saketh Kurnool
>            Priority: Major
>
> h1. Issue
> The Flink planner rejects DATE and TIME when used in a JSON conversion 
> context (e.g. JSON_OBJECT, JSON_ARRAY, or similar). The type is not 
> recognized as scalar or JSON-convertible, causing the statement to fail at 
> submission. Concretely:
>  
> {code:java}
> Failed to (re)submit Job to Flink: {"errors":["Type 'DATE NOT NULL' is not 
> scalar or cannot be converted into JSON."]} {code}
>  
> This affects both batch and streaming modes.
> h1. Proposal
> Add the missing type mappings for TIME_WITHOUT_TIME_ZONE and DATE to generate 
> the JSON conversion code for them.
> h2. Files to modify
>  * JsonGenerateUtils.scala: add cases for DATE and TIME to generate JSON 
> conversion code
>  * SpecificInputTypeStrategies.java: validate that DATETIME type family can 
> be used in JSON context
>  * JsonFunctionsITCase.java: add IT coverage for the two missing types



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to