You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "Francesco Guardiani (Jira)" <ji...@apache.org> on 2021/12/23 08:59:00 UTC

[jira] [Created] (FLINK-25428) Expose complex types CAST to String

Francesco Guardiani created FLINK-25428:
-------------------------------------------

             Summary: Expose complex types CAST to String
                 Key: FLINK-25428
                 URL: https://issues.apache.org/jira/browse/FLINK-25428
             Project: Flink
          Issue Type: Sub-task
          Components: Table SQL / Planner
            Reporter: Francesco Guardiani
         Attachments: cast_function_it_case.patch, logical_type_casts.patch

Right now we have all the casting rules for collection, structured and raw types to string, that is we have logic to stringify the following types:

* ARRAY
* MAP
* MULTISET
* ROW
* STRUCTURED
* RAW

Unfortunately these don't work, for different reasons, notably:

* We need to support these combinations in {{LogicalTypeCasts}} (check the attached patch)
* For some of them Calcite applies its casting validation logic and marks them as invalid
* For MULTISET and STRUCTURED, there are issues specific to Table API and its expression stack, which cannot correctly convert the values to literal

You can check all these errors by applying the attached patch to the cast function it cases.

We need to fix these issues, so users can use SQL and Table API to cast these values to string.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)