lirui-apache 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_r386251018
 
 

 ##########
 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:
   Got it. Thanks for the explanation.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to