Skip to content

Commit

Permalink
[GIE Compiler] revert changes with 'Date' in groot DataType
Browse files Browse the repository at this point in the history
  • Loading branch information
shirly121 committed Oct 17, 2023
1 parent 5875cef commit c77777b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public enum DataType {
DOUBLE_LIST(13),
STRING_LIST(14),
BYTES_LIST(15),
DATE32(16),
DATE(16), // represent DATE32
TIME32(17),
TIMESTAMP(18);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ private int getDataTypeId(DataType dataType) {
return 8;
case STRING_LIST:
return 9;
case DATE32:
case DATE:
return 12;
case TIME32:
return 13;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ private RelDataType deriveType(GraphProperty property) {
return typeFactory.createSqlType(SqlTypeName.FLOAT);
case DOUBLE:
return typeFactory.createSqlType(SqlTypeName.DOUBLE);
case DATE32:
case DATE:
return typeFactory.createSqlType(SqlTypeName.DATE);
case TIME32:
return typeFactory.createSqlType(SqlTypeName.TIME);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public static DataType toDataType(Object type) {
case "DT_STRING":
return DataType.STRING;
case "DT_DATE32":
return DataType.DATE32;
return DataType.DATE;
case "DT_TIME32":
return DataType.TIME32;
case "TIMESTAMP":
Expand Down Expand Up @@ -273,7 +273,7 @@ public static final DataType toDataType(int ordinal) {
case 9:
return DataType.STRING_LIST;
case 12:
return DataType.DATE32;
return DataType.DATE;
case 13:
return DataType.TIME32;
case 14:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public void schema_config_test() throws Exception {
+ " propertyList=[DefaultGraphProperty{id=0, name=id, dataType=LONG},"
+ " DefaultGraphProperty{id=1, name=name, dataType=STRING},"
+ " DefaultGraphProperty{id=2, name=lang, dataType=STRING},"
+ " DefaultGraphProperty{id=3, name=creationDate, dataType=DATE32}],"
+ " DefaultGraphProperty{id=3, name=creationDate, dataType=DATE}],"
+ " primaryKeyList=[id]}",
graphSchema.getElement("software").toString());
}
Expand Down

0 comments on commit c77777b

Please sign in to comment.