Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convert timestamp to int64 #49

Merged
merged 1 commit into from
Feb 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public Object convertBySeaTunnelType(
case TINYINT:
return Byte.parseByte(value.toString());
case BIGINT:
case TIMESTAMP:
return Long.parseLong(value.toString());
case SMALLINT:
return Short.parseShort(value.toString());
Expand All @@ -86,7 +87,6 @@ public Object convertBySeaTunnelType(
return Boolean.parseBoolean(value.toString());
case DOUBLE:
return Double.parseDouble(value.toString());
case TIMESTAMP:
case TIME:
case DATE:
return value.toString();
Expand Down Expand Up @@ -147,7 +147,6 @@ public static CreateCollectionReq.FieldSchema convertToFieldType(
break;
case DATE:
case TIME:
case TIMESTAMP:
fieldSchema.setMaxLength(50);
break;
case STRING:
Expand Down Expand Up @@ -242,8 +241,9 @@ public static io.milvus.v2.common.DataType convertSqlTypeToDataType(SqlType sqlT
return io.milvus.v2.common.DataType.SparseFloatVector;
case DATE:
case TIME:
case TIMESTAMP:
return io.milvus.v2.common.DataType.VarChar;
case TIMESTAMP:
return io.milvus.v2.common.DataType.Int64;
case ROW:
return io.milvus.v2.common.DataType.VarChar;
}
Expand Down