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

[HUDI-5161] add TIMESTAMP_LTZ #7156

Closed
wants to merge 5 commits into from
Closed
Changes from 3 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 @@ -37,6 +37,7 @@
import org.apache.flink.table.types.logical.TinyIntType;
import org.apache.flink.table.types.logical.VarBinaryType;
import org.apache.flink.table.types.logical.VarCharType;
import org.apache.flink.table.types.logical.LocalZonedTimestampType;
import org.apache.flink.table.types.logical.utils.LogicalTypeDefaultVisitor;
import org.apache.hadoop.hive.serde2.typeinfo.TypeInfo;
import org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory;
Expand Down Expand Up @@ -144,6 +145,16 @@ public TypeInfo visit(TimestampType timestampType) {
}
}

@Override
public TypeInfo visit(LocalZonedTimestampType localZonedTimestampType) {
int precision = localZonedTimestampType.getPrecision();
if (precision >= 0 && precision <= 9) {
return TypeInfoFactory.timestampTypeInfo;
} else {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a test case in TestHoodieHiveCatalog.

Copy link
Contributor Author

@kaori-seasons kaori-seasons Nov 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, I will refer to HUDI-4781 to construct related Schemas and add tests

return TypeInfoFactory.longTypeInfo;
}
}

@Override
public TypeInfo visit(ArrayType arrayType) {
LogicalType elementType = arrayType.getElementType();
Expand Down