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

[fix](Outfile) It doesn't specify String logical type when it coms to export data to parquet file format. #42918

Merged
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 @@ -102,6 +102,7 @@ public class OutFileClause {
PARQUET_DATA_LOGICAL_TYPE_TYPE_MAP.put("decimal", TParquetDataLogicalType.DECIMAL);
PARQUET_DATA_LOGICAL_TYPE_TYPE_MAP.put("date", TParquetDataLogicalType.DATE);
PARQUET_DATA_LOGICAL_TYPE_TYPE_MAP.put("datetime", TParquetDataLogicalType.TIMESTAMP);
PARQUET_DATA_LOGICAL_TYPE_TYPE_MAP.put("string", TParquetDataLogicalType.STRING);
// TODO(ftw): add other logical type
PARQUET_DATA_LOGICAL_TYPE_TYPE_MAP.put("none", TParquetDataLogicalType.NONE);

Expand Down Expand Up @@ -560,6 +561,12 @@ private void genParquetSchema(List<Expr> resultExprs, List<String> colLabels) th
}

switch (expr.getType().getPrimitiveType()) {
case CHAR:
case VARCHAR:
case STRING: {
parquetSchema.schema_data_logical_type = PARQUET_DATA_LOGICAL_TYPE_TYPE_MAP.get("string");
break;
}
case DECIMAL32:
case DECIMAL64:
case DECIMAL128: {
Expand Down
Loading