Skip to content

Commit

Permalink
refine type system
Browse files Browse the repository at this point in the history
  • Loading branch information
chaokunyang committed Nov 24, 2024
1 parent 79159ce commit bc15ed7
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ private void registerDefaultTypes() {
registerDefaultTypes(Types.LIST, ArrayList.class, Object[].class);
registerDefaultTypes(Types.SET, HashSet.class, LinkedHashSet.class);
registerDefaultTypes(Types.MAP, HashMap.class, LinkedHashMap.class);
registerDefaultTypes(Types.DATE, LocalDate.class);
registerDefaultTypes(Types.LOCAL_DATE, LocalDate.class);
}

private void registerDefaultTypes(int xtypeId, Class<?> defaultType, Class<?>... otherTypes) {
Expand Down
57 changes: 30 additions & 27 deletions java/fury-core/src/main/java/org/apache/fury/type/Types.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,37 @@ public class Types {
public static final int FLOAT32 = 10;
public static final int FLOAT64 = 11;
public static final int STRING = 12;

public static final int ENUM = 13;
public static final int NS_ENUM = 14;
public static final int STRUCT = 15;
public static final int COMPATIBLE_STRUCT = 15;
public static final int NS_STRUCT = 16;
public static final int NS_COMPATIBLE_STRUCT = 46;
public static final int EXT = 17;
public static final int NS_EXT = 18;
public static final int LIST = 19;
public static final int SET = 20;
public static final int MAP = 21;
public static final int DURATION = 22;
public static final int TIMESTAMP = 23;
public static final int DECIMAL = 24;
public static final int BINARY = 25;
public static final int ARRAY = 26;
public static final int BOOL_ARRAY = 27;
public static final int INT8_ARRAY = 28;
public static final int INT16_ARRAY = 29;
public static final int INT32_ARRAY = 30;
public static final int INT64_ARRAY = 31;
public static final int FLOAT16_ARRAY = 32;
public static final int FLOAT32_ARRAY = 33;
public static final int FLOAT64_ARRAY = 34;
public static final int TENSOR = 35;
public static final int SPARSE_TENSOR = 36;
public static final int ARROW_RECORD_BATCH = 37;
public static final int ARROW_TABLE = 38;
public static final int DATE = 39;
public static final int POLYMORPHIC_STRUCT = 16;
public static final int COMPATIBLE_STRUCT = 17;
public static final int POLYMORPHIC_COMPATIBLE_STRUCT = 18;
public static final int NS_STRUCT = 19;
public static final int NS_POLYMORPHIC_STRUCT = 20;
public static final int NS_COMPATIBLE_STRUCT = 21;
public static final int NS_POLYMORPHIC_COMPATIBLE_STRUCT = 22;
public static final int EXT = 23;
public static final int POLYMORPHIC_EXT = 24;
public static final int NS_EXT = 25;
public static final int NS_POLYMORPHIC_EXT = 26;
public static final int LIST = 27;
public static final int SET = 28;
public static final int MAP = 29;
public static final int DURATION = 30;
public static final int TIMESTAMP = 31;
public static final int LOCAL_DATE = 32;
public static final int DECIMAL = 33;
public static final int BINARY = 34;
public static final int ARRAY = 35;
public static final int BOOL_ARRAY = 36;
public static final int INT8_ARRAY = 37;
public static final int INT16_ARRAY = 38;
public static final int INT32_ARRAY = 39;
public static final int INT64_ARRAY = 40;
public static final int FLOAT16_ARRAY = 41;
public static final int FLOAT32_ARRAY = 42;
public static final int FLOAT64_ARRAY = 43;
public static final int ARROW_RECORD_BATCH = 44;
public static final int ARROW_TABLE = 45;
}

0 comments on commit bc15ed7

Please sign in to comment.