morrySnow opened a new pull request, #69876:
URL: https://github.com/apache/doris/pull/69876

   ### What problem does this PR solve?
   
   Issue Number: None
   
   Related PR: None
   
   Problem Summary: Older FE versions can persist the enum name `TIME` in view 
column schemas. After that enum was removed, Gson reads the name as null. 
Restoring such a view from an image or a create-table journal leaves an invalid 
column type, and `information_schema.columns` fails in `describeTables` when 
converting the type to Thrift.
   
   Add `TIME` as a deserialization alias of `PrimitiveType.TIMEV2` through 
Gson's existing enum adapter. New metadata continues to serialize as `TIMEV2`. 
Tests cover the enum and scalar type, ordinary and nested columns, current 
precision preservation, and view recovery through both image and journal entry 
points.
   
   ### Release note
   
   Fix `information_schema.columns` queries failing after an upgrade when 
existing view metadata contains the legacy TIME type.
   
   ### Check List (For Author)
   
   - Test: Unit Test / Checkstyle
       - `./run-fe-ut.sh --run 
org.apache.doris.catalog.LegacyTimeTypeGsonCompatibilityTest,org.apache.doris.catalog.ColumnGsonSerializationTest,org.apache.doris.catalog.ViewReplayTest`:
 12 tests passed on dev-hk.
       - All six new compatibility tests failed before the fix, including the 
original null-pointer exception on the image and journal paths.
       - `mvn checkstyle:check -pl fe-type,fe-core`: passed.
       - Validation ran on the development branch; this PR replays the 
identical fix and test class onto the current upstream master base.
   - Behavior changed: Yes; persisted TIME is loaded as TIMEV2, while 
serialization continues to write TIMEV2.
   - Does this need documentation: No
   
   


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