[
https://issues.apache.org/jira/browse/FLINK-25341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Timo Walther updated FLINK-25341:
---------------------------------
Description:
Structured types currently use ROW to STRING logic. However, this is not very
useful for users as the field order might be determined by Flink. Also,
structured types has the nice property of defining a custom {{toString}} and
attribute names.
I would suggest the following:
If the structured type has a {{StructuredType.getImplementationClass}} convert
to external class and call {{toString}}.
If no implementation class is present or the toString is not possible, use the
string representation of maps.
was:
Structured types currently use ROW to STRING logic. However, this is not very
useful for users as the field order might be determined by Flink. Also,
structured types has the nice property of defining a custom {{toString}} and
attribute names.
I would suggest the following:
If the structured type has a {{StructuredType.getImplementationClass}} convert
to external class and call {{toString}}.
If no implementation class is present, use the string representation of maps.
> Improve casting structured type to STRING
> -----------------------------------------
>
> Key: FLINK-25341
> URL: https://issues.apache.org/jira/browse/FLINK-25341
> Project: Flink
> Issue Type: Sub-task
> Components: Table SQL / Planner
> Reporter: Timo Walther
> Priority: Major
>
> Structured types currently use ROW to STRING logic. However, this is not very
> useful for users as the field order might be determined by Flink. Also,
> structured types has the nice property of defining a custom {{toString}} and
> attribute names.
> I would suggest the following:
> If the structured type has a {{StructuredType.getImplementationClass}}
> convert to external class and call {{toString}}.
> If no implementation class is present or the toString is not possible, use
> the string representation of maps.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)