Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Zouxxyy committed Nov 21, 2024
1 parent 3a049ed commit 5df0e61
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import org.apache.hadoop.hive.serde2.typeinfo.TypeInfo;
import org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory;

import java.lang.reflect.Method;
import java.lang.reflect.Field;

/**
* Utils to convert between Hive TimestampLocalTZTypeInfo and Paimon {@link
Expand All @@ -46,8 +46,8 @@ public static TypeInfo hiveLocalZonedTimestampType() {
try {
Class<?> typeInfoFactoryClass =
Class.forName("org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory");
Method method = typeInfoFactoryClass.getMethod("timestampLocalTZTypeInfo");
return (TypeInfo) method.invoke(null);
Field field = typeInfoFactoryClass.getField("timestampLocalTZTypeInfo");
return (TypeInfo) field.get(null);
} catch (Exception e) {
return TypeInfoFactory.timestampTypeInfo;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,7 @@ private static void checkFieldsMatched(
}

private static boolean typeInfoMatched(TypeInfo l, TypeInfo r) {
return Objects.equals(l, r)
|| (LocalZonedTimestampTypeUtils.isHiveCompatibleTimestampType(l)
&& LocalZonedTimestampTypeUtils.isHiveCompatibleTimestampType(r));
return Objects.equals(l, r);
}

private static void checkPartitionMatched(
Expand Down

0 comments on commit 5df0e61

Please sign in to comment.