wsjz commented on code in PR #15794: URL: https://github.com/apache/doris/pull/15794#discussion_r1066702030
########## be/src/vec/exec/format/parquet/schema_desc.cpp: ########## @@ -231,39 +232,41 @@ TypeDescriptor FieldDescriptor::convert_to_doris_type(tparquet::ConvertedType::t TypeDescriptor type; switch (convertedType) { case tparquet::ConvertedType::type::UTF8: - type.type = TYPE_STRING; + type = TypeDescriptor(TYPE_STRING); break; case tparquet::ConvertedType::type::DECIMAL: - type.type = TYPE_DECIMALV2; - type.precision = 27; - type.scale = 9; + type = TypeDescriptor(TYPE_DECIMALV2); Review Comment: constuctor will set precision to -1 , so it will throw exception when DCHECK_NE(precision, -1) is somewhere ########## be/src/vec/exec/format/parquet/schema_desc.cpp: ########## @@ -231,39 +232,41 @@ TypeDescriptor FieldDescriptor::convert_to_doris_type(tparquet::ConvertedType::t TypeDescriptor type; switch (convertedType) { case tparquet::ConvertedType::type::UTF8: - type.type = TYPE_STRING; + type = TypeDescriptor(TYPE_STRING); break; case tparquet::ConvertedType::type::DECIMAL: - type.type = TYPE_DECIMALV2; - type.precision = 27; - type.scale = 9; + type = TypeDescriptor(TYPE_DECIMALV2); break; case tparquet::ConvertedType::type::DATE: - type.type = TYPE_DATEV2; + type = TypeDescriptor(TYPE_DATEV2); break; case tparquet::ConvertedType::type::TIME_MILLIS: case tparquet::ConvertedType::type::TIME_MICROS: - type.type = TYPE_TIMEV2; + type = TypeDescriptor(TYPE_TIMEV2); break; case tparquet::ConvertedType::type::TIMESTAMP_MILLIS: case tparquet::ConvertedType::type::TIMESTAMP_MICROS: - type.type = TYPE_DATETIMEV2; + type = TypeDescriptor(TYPE_DATETIMEV2); Review Comment: same as TYPE_DECIMALV2 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org