AshinGau commented on code in PR #20570:
URL: https://github.com/apache/doris/pull/20570#discussion_r1223751180


##########
fe/fe-core/src/main/java/org/apache/doris/catalog/external/HMSExternalTable.java:
##########
@@ -367,16 +374,13 @@ public List<Column> initSchema() {
         return columns;
     }
 
-
     public List<Column> getHudiSchema(List<FieldSchema> hmsSchema) {
-        org.apache.avro.Schema schema = 
HiveMetaStoreClientHelper.getHudiTableSchema(this);
+        org.apache.avro.Schema hudiSchema = 
HiveMetaStoreClientHelper.getHudiTableSchema(this);
         List<Column> tmpSchema = 
Lists.newArrayListWithCapacity(hmsSchema.size());
-        for (FieldSchema field : hmsSchema) {
-            tmpSchema.add(new Column(field.getName(),
-                    
HiveMetaStoreClientHelper.hiveTypeToDorisType(field.getType(),
-                            IcebergExternalTable.ICEBERG_DATETIME_SCALE_MS), 
true, null,
-                    true, null, field.getComment(), true, null,
-                    schema.getIndexNamed(field.getName()), null));
+        for (org.apache.avro.Schema.Field hudiField : hudiSchema.getFields()) {
+            String columnName = hudiField.name().toLowerCase(Locale.ROOT);
+            tmpSchema.add(new Column(columnName, 
HudiUtils.fromAvroHudiTypeToDorisType(hudiField.schema()),

Review Comment:
   `schema.getIndexNamed` return the index order of the column in hudi table, 
but it is not implemented in some subclasses.



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to