AshinGau commented on code in PR #30119:
URL: https://github.com/apache/doris/pull/30119#discussion_r1458304744


##########
be/src/vec/exec/format/parquet/parquet_column_convert.h:
##########
@@ -671,8 +683,16 @@ inline Status get_converter(tparquet::Type::type 
parquet_physical_type, Primitiv
         break;
     case TypeIndex::DateTimeV2:
         if (tparquet::Type::INT96 == parquet_physical_type) {
+            // int96 only stores nanoseconds in standard parquet file
+            convert_params->reset_time_scale_if_missing(9);
             *converter = std::make_unique<Int96toTimestamp>();
         } else if (tparquet::Type::INT64 == parquet_physical_type) {
+            int ts_scale = remove_nullable(dst_data_type)->get_scale();
+            int scale = 6;
+            if (ts_scale <= 3) {

Review Comment:
   In the Parquet standard, there are indeed only four precisions: seconds (0), 
milliseconds (3), microseconds (6), and nanoseconds (9). Does this 
implementation ignore the situation where the precision is seconds(0). Then, if 
this rule is universal, you can write the rule to `reset_time_scale_if_missing 
`.



-- 
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

Reply via email to