Github user zivanfi commented on a diff in the pull request:
https://github.com/apache/spark/pull/16781#discussion_r104660877
--- Diff:
sql/core/src/main/java/org/apache/spark/sql/execution/datasources/parquet/VectorizedColumnReader.java
---
@@ -89,11 +92,23 @@
private final PageReader pageReader;
private final ColumnDescriptor descriptor;
+ private final TimeZone storageTz;
+ private final TimeZone localTz = TimeZone.getDefault();
- public VectorizedColumnReader(ColumnDescriptor descriptor, PageReader
pageReader)
+ public VectorizedColumnReader(ColumnDescriptor descriptor, PageReader
pageReader,
+ Configuration conf)
throws IOException {
this.descriptor = descriptor;
this.pageReader = pageReader;
+ // If the table has a timezone property, apply the correct
conversions. See SPARK-12297.
+ // The conf is sometimes null in tests.
+ String tzString =
+ conf == null ? null :
conf.get(ParquetFileFormat.PARQUET_TIMEZONE_TABLE_PROPERTY());
+ if (tzString == null || tzString == "") {
--- End diff --
This is java code, not scala, you probably meant tzString.equals("")
instead of tzString == ""
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]