JingsongLi commented on a change in pull request #11277: [FLINK-16360][orc] 
Flink STRING data type should map to ORC STRING type
URL: https://github.com/apache/flink/pull/11277#discussion_r386226094
 
 

 ##########
 File path: 
flink-formats/flink-orc/src/main/java/org/apache/flink/orc/OrcSplitReaderUtil.java
 ##########
 @@ -140,7 +140,12 @@ static TypeDescription logicalTypeToOrcType(LogicalType 
type) {
                        case CHAR:
                                return 
TypeDescription.createChar().withMaxLength(((CharType) type).getLength());
                        case VARCHAR:
-                               return 
TypeDescription.createVarchar().withMaxLength(((VarCharType) type).getLength());
+                               int len = ((VarCharType) type).getLength();
+                               if (len == VarCharType.MAX_LENGTH) {
+                                       return TypeDescription.createString();
 
 Review comment:
   `VARCHAR(2147483647)` is `STRING` in Flink.
   We don't need support real `VARCHAR(2147483647)` in orc for hive 2.0. Hive 
don't have this type.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to