getTypeIDValue returns numeric value for type ID for sorting This uses the actual Fory TypeId constants for accuracy
(typeID string)
| 285 | // getTypeIDValue returns numeric value for type ID for sorting |
| 286 | // This uses the actual Fory TypeId constants for accuracy |
| 287 | func getTypeIDValue(typeID string) int { |
| 288 | switch typeID { |
| 289 | case "BOOL": |
| 290 | return int(fory.BOOL) // 1 |
| 291 | case "INT8": |
| 292 | return int(fory.INT8) // 2 |
| 293 | case "INT16": |
| 294 | return int(fory.INT16) // 3 |
| 295 | case "INT32": |
| 296 | return int(fory.INT32) // 4 |
| 297 | case "VARINT32": |
| 298 | return int(fory.VARINT32) // 5 |
| 299 | case "INT64": |
| 300 | return int(fory.INT64) // 6 |
| 301 | case "VARINT64": |
| 302 | return int(fory.VARINT64) // 7 |
| 303 | case "UINT8": |
| 304 | return int(fory.UINT8) // 9 |
| 305 | case "UINT16": |
| 306 | return int(fory.UINT16) // 10 |
| 307 | case "UINT32": |
| 308 | return int(fory.UINT32) // 11 |
| 309 | case "VAR_UINT32": |
| 310 | return int(fory.VAR_UINT32) // 12 |
| 311 | case "UINT64": |
| 312 | return int(fory.UINT64) // 13 |
| 313 | case "VAR_UINT64": |
| 314 | return int(fory.VAR_UINT64) // 14 |
| 315 | case "FLOAT32": |
| 316 | return int(fory.FLOAT32) |
| 317 | case "FLOAT64": |
| 318 | return int(fory.FLOAT64) |
| 319 | case "STRING": |
| 320 | return int(fory.STRING) // 9 |
| 321 | case "BINARY": |
| 322 | return int(fory.BINARY) // 10 |
| 323 | case "LIST": |
| 324 | return int(fory.LIST) // 20 |
| 325 | case "SET": |
| 326 | return int(fory.SET) // 21 |
| 327 | case "MAP": |
| 328 | return int(fory.MAP) // 22 |
| 329 | case "TIMESTAMP": |
| 330 | return int(fory.TIMESTAMP) // 25 |
| 331 | case "DATE": |
| 332 | return int(fory.DATE) // 26 |
| 333 | case "NAMED_STRUCT": |
| 334 | return int(fory.NAMED_STRUCT) // 17 |
| 335 | // Primitive array types |
| 336 | case "BOOL_ARRAY": |
| 337 | return int(fory.BOOL_ARRAY) // 39 |
| 338 | case "INT8_ARRAY": |
| 339 | return int(fory.INT8_ARRAY) // 40 |
| 340 | case "INT16_ARRAY": |
| 341 | return int(fory.INT16_ARRAY) // 41 |
| 342 | case "INT32_ARRAY": |
| 343 | return int(fory.INT32_ARRAY) // 42 |
| 344 | case "INT64_ARRAY": |