starocean999 commented on code in PR #64026:
URL: https://github.com/apache/doris/pull/64026#discussion_r3418604797


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergUtils.java:
##########
@@ -1744,6 +1754,13 @@ private static Optional<SchemaCacheValue> 
loadTableSchemaCacheValue(ExternalTabl
             Types.NestedField col = 
icebergTable.schema().findField(field.sourceId());
             for (Column c : schema) {
                 if (c.getName().equalsIgnoreCase(col.name())) {
+                    // For partition column, if it is string type, change it 
to varchar(65535)
+                    // to be same as doris managed table.
+                    // This is to avoid some unexpected behavior such as 
different partition pruning result
+                    // between doris managed table and external table.
+                    if (c.getType().getPrimitiveType() == 
PrimitiveType.STRING) {
+                        
c.setType(ScalarType.createVarcharType(ScalarType.MAX_VARCHAR_LENGTH));

Review Comment:
   已修正注释



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to