Github user rajrahul commented on a diff in the pull request:
https://github.com/apache/drill/pull/1166#discussion_r177318780
--- Diff:
exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/writer/TestParquetWriter.java
---
@@ -797,6 +797,24 @@ public void
testImpalaParquetBinaryAsTimeStamp_DictChange() throws Exception {
}
}
+ @Test
+ public void testSparkParquetBinaryAsTimeStamp_DictChange() throws
Exception {
+ try {
+ mockUtcDateTimeZone();
--- End diff --
I could see two ways of doing this within the code itself.
1. Mock and run with UTC, and compare the results in UTC as in
TestCastFunctions#testToDateForTimeStamp. Since TestParquetWriter already has a
RunWith annotation, we might have to create another class and move both the
methods.
2. Run with the JVM timezone(no mocking) and compare the results after a
'convertToLocalTimestamp' as in TestParquetWriter#testInt96TimeStampValueWidth
Approach 2 does not used fixed UTC timezone. Which approach do you suggest?
---