[jira] [Commented] (FLINK-10120) Support string representation for types like array

2018-08-30 Thread Jun Zhang (JIRA)


[ 
https://issues.apache.org/jira/browse/FLINK-10120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16598119#comment-16598119
 ] 

Jun Zhang commented on FLINK-10120:
---

Issue resolved, please refer to FLINK-10170.

> 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: Table API  SQL, Type Serialization System
>Affects Versions: 1.6.1, 1.7.0
>Reporter: Jiayi Liao
>Assignee: Jun Zhang
>Priority: Minor
> Fix For: 1.6.0
>
>
> 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)


[jira] [Commented] (FLINK-10120) Support string representation for types like array

2018-08-10 Thread Fabian Hueske (JIRA)


[ 
https://issues.apache.org/jira/browse/FLINK-10120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16575978#comment-16575978
 ] 

Fabian Hueske commented on FLINK-10120:
---

Great, thanks! :-)

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


[jira] [Commented] (FLINK-10120) Support string representation for types like array

2018-08-10 Thread buptljy (JIRA)


[ 
https://issues.apache.org/jira/browse/FLINK-10120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16575975#comment-16575975
 ] 

buptljy commented on FLINK-10120:
-

[~fhueske] Sorry, the description before was a bit confusing, I've already 
updated it.

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


[jira] [Commented] (FLINK-10120) Support string representation for types like array

2018-08-10 Thread Fabian Hueske (JIRA)


[ 
https://issues.apache.org/jira/browse/FLINK-10120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16575957#comment-16575957
 ] 

Fabian Hueske commented on FLINK-10120:
---

Thanks for reporting the issue, I did not fully understand the problem though.
The types that you show in the description are different and not compatible. 

Is the problem that {{TypeStringUtils.readTypeInfo()}} does not support Array 
types? If that is the case, could you please update the issue description to 
make that more clear?
Thank you, Fabian

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



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)