NeedWriteRef returns whether a type with the given type ID needs reference tracking. Primitive types, strings, and time types don't need reference tracking. Collections, structs, and other complex types need reference tracking.
(typeID TypeId)
| 204 | // Primitive types, strings, and time types don't need reference tracking. |
| 205 | // Collections, structs, and other complex types need reference tracking. |
| 206 | func NeedWriteRef(typeID TypeId) bool { |
| 207 | switch typeID { |
| 208 | case BOOL, INT8, INT16, INT32, INT64, VARINT32, VARINT64, TAGGED_INT64, |
| 209 | FLOAT32, FLOAT64, FLOAT16, FLOAT8, BFLOAT16, |
| 210 | STRING, TIMESTAMP, DATE, DURATION, DECIMAL, NONE: |
| 211 | return false |
| 212 | default: |
| 213 | return true |
| 214 | } |
| 215 | } |
| 216 | |
| 217 | func isListType(typeID TypeId) bool { |
| 218 | return typeID == LIST |
no outgoing calls
no test coverage detected