[jira] [Commented] (FLINK-13385) Align Hive data type mapping with FLIP-37

2019-07-24 Thread Terry Wang (JIRA)


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

Terry Wang commented on FLINK-13385:


ok, I'll check it both in doc and code.

> Align Hive data type mapping with FLIP-37
> -
>
> Key: FLINK-13385
> URL: https://issues.apache.org/jira/browse/FLINK-13385
> Project: Flink
>  Issue Type: Bug
>  Components: Connectors / Hive
>Reporter: Timo Walther
>Assignee: Terry Wang
>Priority: Major
>
> By looking at the Hive data type mapping of:
> https://ci.apache.org/projects/flink/flink-docs-master/dev/table/catalog.html#data-type-mapping
> Based on the information available in:
> https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Types
> It seems that the type are not mapped correctly. The following changes should 
> be performed (indicated by {{>>...<<}}):
> {code}
> CHAR(p)   char(p)*
> VARCHAR(p)varchar(p)**
> STRINGstring
> BOOLEAN   boolean
> >>TINYINT<<   tinyint
> >>SMALLINT<<  smallint
> INT   int
> BIGINTlong
> FLOAT float
> DOUBLEdouble
> DECIMAL(p, s) decimal(p, s)
> DATE  date
> TIMESTAMP_WITHOUT_TIME_ZONE   TIMESTAMP
> TIMESTAMP_WITH_TIME_ZONE  N/A
> TIMESTAMP_WITH_LOCAL_TIME_ZONEN/A
> INTERVAL  >>INTERVAL?<<
> BINARY>>N/A<<
> VARBINARY(p)  >>N/A<<
> >>BYTES   BINARY<<
> >>ARRAYARRAY<<
> >>MAP   MAP* we support more than primitives<<
> ROW   struct
> MULTISET  N/A
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (FLINK-13385) Align Hive data type mapping with FLIP-37

2019-07-24 Thread Timo Walther (JIRA)


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

Timo Walther commented on FLINK-13385:
--

I assigned you [~Terry1897]. Please make sure that also the `HiveTypeUtil` is 
in sync with the documentation.

> Align Hive data type mapping with FLIP-37
> -
>
> Key: FLINK-13385
> URL: https://issues.apache.org/jira/browse/FLINK-13385
> Project: Flink
>  Issue Type: Bug
>  Components: Connectors / Hive
>Reporter: Timo Walther
>Assignee: Terry Wang
>Priority: Major
>
> By looking at the Hive data type mapping of:
> https://ci.apache.org/projects/flink/flink-docs-master/dev/table/catalog.html#data-type-mapping
> Based on the information available in:
> https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Types
> It seems that the type are not mapped correctly. The following changes should 
> be performed (indicated by {{>>...<<}}):
> {code}
> CHAR(p)   char(p)*
> VARCHAR(p)varchar(p)**
> STRINGstring
> BOOLEAN   boolean
> >>TINYINT<<   tinyint
> >>SMALLINT<<  smallint
> INT   int
> BIGINTlong
> FLOAT float
> DOUBLEdouble
> DECIMAL(p, s) decimal(p, s)
> DATE  date
> TIMESTAMP_WITHOUT_TIME_ZONE   TIMESTAMP
> TIMESTAMP_WITH_TIME_ZONE  N/A
> TIMESTAMP_WITH_LOCAL_TIME_ZONEN/A
> INTERVAL  >>INTERVAL?<<
> BINARY>>N/A<<
> VARBINARY(p)  >>N/A<<
> >>BYTES   BINARY<<
> >>ARRAYARRAY<<
> >>MAP   MAP* we support more than primitives<<
> ROW   struct
> MULTISET  N/A
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (FLINK-13385) Align Hive data type mapping with FLIP-37

2019-07-24 Thread Terry Wang (JIRA)


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

Terry Wang commented on FLINK-13385:


Could you assign this Jira to me, I'd like to fix it. [~twalthr]

> Align Hive data type mapping with FLIP-37
> -
>
> Key: FLINK-13385
> URL: https://issues.apache.org/jira/browse/FLINK-13385
> Project: Flink
>  Issue Type: Bug
>  Components: Connectors / Hive
>Reporter: Timo Walther
>Priority: Major
>
> By looking at the Hive data type mapping of:
> https://ci.apache.org/projects/flink/flink-docs-master/dev/table/catalog.html#data-type-mapping
> Based on the information available in:
> https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Types
> It seems that the type are not mapped correctly. The following changes should 
> be performed (indicated by {{>>...<<}}):
> {code}
> CHAR(p)   char(p)*
> VARCHAR(p)varchar(p)**
> STRINGstring
> BOOLEAN   boolean
> >>TINYINT<<   tinyint
> >>SMALLINT<<  smallint
> INT   int
> BIGINTlong
> FLOAT float
> DOUBLEdouble
> DECIMAL(p, s) decimal(p, s)
> DATE  date
> TIMESTAMP_WITHOUT_TIME_ZONE   TIMESTAMP
> TIMESTAMP_WITH_TIME_ZONE  N/A
> TIMESTAMP_WITH_LOCAL_TIME_ZONEN/A
> INTERVAL  >>INTERVAL?<<
> BINARY>>N/A<<
> VARBINARY(p)  >>N/A<<
> >>BYTES   BINARY<<
> >>ARRAYARRAY<<
> >>MAP   MAP* we support more than primitives<<
> ROW   struct
> MULTISET  N/A
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (FLINK-13385) Align Hive data type mapping with FLIP-37

2019-07-24 Thread Timo Walther (JIRA)


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

Timo Walther commented on FLINK-13385:
--

As far as I understand the Hive documentation, the Hive's {{BINARY}} type is 
equivalent to Flink's {{BYTES}} type. In other words: a variable-length data 
type with maximum length. The other types don't match because they have either 
a fixed length or potentially truncate the data.

> Align Hive data type mapping with FLIP-37
> -
>
> Key: FLINK-13385
> URL: https://issues.apache.org/jira/browse/FLINK-13385
> Project: Flink
>  Issue Type: Bug
>  Components: Connectors / Hive
>Reporter: Timo Walther
>Priority: Major
>
> By looking at the Hive data type mapping of:
> https://ci.apache.org/projects/flink/flink-docs-master/dev/table/catalog.html#data-type-mapping
> Based on the information available in:
> https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Types
> It seems that the type are not mapped correctly. The following changes should 
> be performed (indicated by {{>>...<<}}):
> {code}
> CHAR(p)   char(p)*
> VARCHAR(p)varchar(p)**
> STRINGstring
> BOOLEAN   boolean
> >>TINYINT<<   tinyint
> >>SMALLINT<<  smallint
> INT   int
> BIGINTlong
> FLOAT float
> DOUBLEdouble
> DECIMAL(p, s) decimal(p, s)
> DATE  date
> TIMESTAMP_WITHOUT_TIME_ZONE   TIMESTAMP
> TIMESTAMP_WITH_TIME_ZONE  N/A
> TIMESTAMP_WITH_LOCAL_TIME_ZONEN/A
> INTERVAL  >>INTERVAL?<<
> BINARY>>N/A<<
> VARBINARY(p)  >>N/A<<
> >>BYTES   BINARY<<
> >>ARRAYARRAY<<
> >>MAP   MAP* we support more than primitives<<
> ROW   struct
> MULTISET  N/A
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (FLINK-13385) Align Hive data type mapping with FLIP-37

2019-07-23 Thread Xuefu Zhang (JIRA)


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

Xuefu Zhang commented on FLINK-13385:
-

Hi [~twalthr], thanks for pointing this out. I'm not sure if I fully understand 
your change request regarding the following:
{code}
BINARY  >>N/A<<
VARBINARY(p)>>N/A<<
>>BYTES BINARY<<
{code}

The first two lines are currently mapped to Hive binary type, as shown in 
HiveTypeUtil.java. In addition, BINARY and VARBINARY are defined in 
LogicalTypeRoot while BYTES are defined in DataTypes. I'm not sure why we 
should put them together.

Please clarify.

> Align Hive data type mapping with FLIP-37
> -
>
> Key: FLINK-13385
> URL: https://issues.apache.org/jira/browse/FLINK-13385
> Project: Flink
>  Issue Type: Bug
>  Components: Connectors / Hive
>Reporter: Timo Walther
>Priority: Major
>
> By looking at the Hive data type mapping of:
> https://ci.apache.org/projects/flink/flink-docs-master/dev/table/catalog.html#data-type-mapping
> Based on the information available in:
> https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Types
> It seems that the type are not mapped correctly. The following changes should 
> be performed (indicated by {{>>...<<}}):
> {code}
> CHAR(p)   char(p)*
> VARCHAR(p)varchar(p)**
> STRINGstring
> BOOLEAN   boolean
> >>TINYINT<<   tinyint
> >>SMALLINT<<  smallint
> INT   int
> BIGINTlong
> FLOAT float
> DOUBLEdouble
> DECIMAL(p, s) decimal(p, s)
> DATE  date
> TIMESTAMP_WITHOUT_TIME_ZONE   TIMESTAMP
> TIMESTAMP_WITH_TIME_ZONE  N/A
> TIMESTAMP_WITH_LOCAL_TIME_ZONEN/A
> INTERVAL  >>INTERVAL?<<
> BINARY>>N/A<<
> VARBINARY(p)  >>N/A<<
> >>BYTES   BINARY<<
> >>ARRAYARRAY<<
> >>MAP   MAP* we support more than primitives<<
> ROW   struct
> MULTISET  N/A
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)