github-actions[bot] commented on code in PR #69877:
URL: https://github.com/apache/doris/pull/69877#discussion_r4420443179


##########
fe/fe-common/src/main/java/org/apache/doris/catalog/PrimitiveType.java:
##########
@@ -66,6 +66,8 @@ public enum PrimitiveType {
     AGG_STATE("AGG_STATE", 16, TPrimitiveType.AGG_STATE, true),
     DATEV2("DATEV2", 4, TPrimitiveType.DATEV2, true),
     DATETIMEV2("DATETIMEV2", 8, TPrimitiveType.DATETIMEV2, true),
+    // Legacy view schemas persisted TIME before the v1 type was removed.
+    @SerializedName(value = "TIMEV2", alternate = {"TIME"})

Review Comment:
   [P1] Add TIMEV2 handling to the information_schema.columns scanner
   
   The new alias makes a legacy view column deserialize as 
`PrimitiveType.TIMEV2`, so `FrontendServiceImpl.describeTables()` now sends 
`TPrimitiveType.TIMEV2` for it. On this branch, 
`be/src/information_schema/schema_columns_scanner.cpp` has no `TIMEV2` cases in 
`_to_mysql_data_type_string()` or `_type_to_string()`, so both `DATA_TYPE` and 
`COLUMN_TYPE` fall through to `unknown`; its precision branches also exclude 
only `DATETIMEV2`/`TIMESTAMPTZ`, so TIMEV2 metadata is reported through the 
numeric fields instead of the time scale. A restored legacy view therefore 
becomes queryable but exposes incorrect `information_schema.columns` metadata. 
Add the TIMEV2 cases and treat its scale as temporal (the later af933bf5d75 fix 
shows the required downstream behavior).



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