This is an automated email from the ASF dual-hosted git repository.
soumyakantidas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/master by this push:
new 88686011ac6 HIVE-29521: Unit tests TestTimestampTZ,
TestTimestampTZWritable fail due to different JDK locale (#6388)
88686011ac6 is described below
commit 88686011ac68720b0f935e3410e134db3a767216
Author: Hemanth Umashankar
<[email protected]>
AuthorDate: Wed Apr 1 00:31:22 2026 +0530
HIVE-29521: Unit tests TestTimestampTZ, TestTimestampTZWritable fail due to
different JDK locale (#6388)
---
.../src/java/org/apache/hadoop/hive/common/type/TimestampTZUtil.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git
a/common/src/java/org/apache/hadoop/hive/common/type/TimestampTZUtil.java
b/common/src/java/org/apache/hadoop/hive/common/type/TimestampTZUtil.java
index 7d9208b89b4..eaefd36ed93 100644
--- a/common/src/java/org/apache/hadoop/hive/common/type/TimestampTZUtil.java
+++ b/common/src/java/org/apache/hadoop/hive/common/type/TimestampTZUtil.java
@@ -37,6 +37,7 @@
import java.time.temporal.ChronoField;
import java.time.temporal.TemporalAccessor;
import java.time.temporal.TemporalQueries;
+import java.util.Locale;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -83,8 +84,8 @@ public class TimestampTZUtil {
// Zone part
builder.optionalStart().appendLiteral(" ").optionalEnd();
builder.optionalStart().appendZoneOrOffsetId().optionalEnd();
-
- FORMATTER = builder.toFormatter();
+ // Hardcode Locale.US to ensure consistent parsing behavior regardless of
the system's default locale.
+ FORMATTER = builder.toFormatter(Locale.US);
}
public static TimestampTZ parse(String s) {