chaokunyang commented on code in PR #2638:
URL: https://github.com/apache/fory/pull/2638#discussion_r2366272456


##########
go/fory/codegen/utils.go:
##########
@@ -194,24 +228,27 @@ func getPrimitiveSize(t types.Type) int {
 }
 
 // getTypeIDValue returns numeric value for type ID for sorting
+// This should match the actual Fory TypeId values used by reflection
 func getTypeIDValue(typeID string) int {
-       // Map Fory TypeIDs to numeric values for sorting
+       // Map Fory TypeIDs to their actual numeric values (matching reflection)
        typeIDMap := map[string]int{
-               "BOOL":         1,
-               "INT8":         2,
-               "INT16":        3,
-               "INT32":        4,
-               "INT64":        5,
-               "UINT8":        6,
-               "UINT16":       7,
-               "UINT32":       8,
-               "UINT64":       9,
-               "FLOAT32":      10,
-               "FLOAT64":      11,
-               "STRING":       12,
-               "TIMESTAMP":    20,
-               "LOCAL_DATE":   21,
-               "NAMED_STRUCT": 30,
+               "BOOL":         1,   // BOOL = 1

Review Comment:
   could we use const in `type.go`?



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