[fix](multi-catalog) verify the precision of datetime types for each data source (#19544)
Fix threes bugs of timestampv2 precision: 1. Hive catalog doesn't set the precision of timestampv2, and can't get the precision from hive metastore, so set the largest precision for timestampv2; 2. Jdbc catalog use datetimev1 to parse timestamp, and convert to timestampv2, so the precision is lost. 3. TVF doesn't use the precision from meta data of file format.
This commit is contained in:
@ -140,6 +140,8 @@ public class ScalarType extends Type {
|
||||
return createDecimalV3Type(precision, scale);
|
||||
case DECIMALV2:
|
||||
return createDecimalType(precision, scale);
|
||||
case DATETIMEV2:
|
||||
return createDatetimeV2Type(scale);
|
||||
default:
|
||||
return createType(type);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user