You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "buptljy (JIRA)" <ji...@apache.org> on 2018/08/10 08:58:00 UTC
[jira] [Updated] (FLINK-10120) Support string representation for
types like array
[ https://issues.apache.org/jira/browse/FLINK-10120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
buptljy updated FLINK-10120:
----------------------------
Description:
In TypeStringUtils.readTypeInfo:
{code:java}
case _: BasicArrayTypeInfo[_, _] | _: ObjectArrayTypeInfo[_, _] |
_: PrimitiveArrayTypeInfo[_] =>
throw new TableException("A string representation for array types is not supported yet.")
{code}
This exception makes us unable to create a table schema or format schema with a array type field.
I'm not sure whether this is an improvement or not, because you throw an exception explicitly here.
was:
Now we have to use row type to replace array type when we want to create a table schema or format schema with nested types. For example, we have to use
{code:java}
Types.ROW(
new String[]{"a", "b", "c"},
new TypeInformation[]{Types.STRING(), Types.INT(), Types.ROW(
new String[]{"a", "b", "c"},
new TypeInformation[]{Types.STRING(), Types.STRING(),Types.STRING()})}
{code}
instead of
{code:java}
Types.ROW(
new String[]{"a", "b", "c"},
new TypeInformation[]{Types.STRING(), Types.INT(), BasicArrayTypeInfo.STRING_TYPE_INFO})
{code}
because the program will fail in TypeStringUtils.readTypeInfo.
> Support string representation for types like array
> --------------------------------------------------
>
> Key: FLINK-10120
> URL: https://issues.apache.org/jira/browse/FLINK-10120
> Project: Flink
> Issue Type: Improvement
> Components: Type Serialization System
> Reporter: buptljy
> Priority: Minor
>
> In TypeStringUtils.readTypeInfo:
> {code:java}
> case _: BasicArrayTypeInfo[_, _] | _: ObjectArrayTypeInfo[_, _] |
> _: PrimitiveArrayTypeInfo[_] =>
> throw new TableException("A string representation for array types is not supported yet.")
> {code}
> This exception makes us unable to create a table schema or format schema with a array type field.
> I'm not sure whether this is an improvement or not, because you throw an exception explicitly here.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)