spark-instrumented-optimizer/external
gatorsmile a4002651a3 [SPARK-20557][SQL] Only support TIMESTAMP WITH TIME ZONE for Oracle Dialect
## What changes were proposed in this pull request?
In the previous PRs, https://github.com/apache/spark/pull/17832 and https://github.com/apache/spark/pull/17835 , we convert `TIMESTAMP WITH TIME ZONE` and `TIME WITH TIME ZONE` to `TIMESTAMP` for all the JDBC sources. However, this conversion could be risky since it does not respect our SQL configuration `spark.sql.session.timeZone`.

In addition, each vendor might have different semantics for these two types. For example, Postgres simply returns `TIMESTAMP` types for `TIMESTAMP WITH TIME ZONE`. For such supports, we should do it case by case. This PR reverts the general support of `TIMESTAMP WITH TIME ZONE` and `TIME WITH TIME ZONE` for JDBC sources, except ORACLE Dialect.

When supporting the ORACLE's `TIMESTAMP WITH TIME ZONE`, we only support it when the JVM default timezone is the same as the user-specified configuration `spark.sql.session.timeZone` (whose default is the JVM default timezone). Now, we still treat `TIMESTAMP WITH TIME ZONE` as `TIMESTAMP` when fetching the values via the Oracle JDBC connector, whose client converts the timestamp values with time zone to the timestamp values using the local JVM default timezone (a test case is added to `OracleIntegrationSuite.scala` in this PR for showing the behavior). Thus, to avoid any future behavior change, we will not support it if JVM default timezone is different from `spark.sql.session.timeZone`

No regression because the previous two PRs were just merged to be unreleased master branch.

## How was this patch tested?
Added the test cases

Author: gatorsmile <gatorsmile@gmail.com>

Closes #19939 from gatorsmile/timezoneUpdate.
2017-12-11 16:33:06 -08:00
..
docker [SPARK-20759] SCALA_VERSION in _config.yml should be consistent with pom.xml 2017-05-19 15:26:39 +01:00
docker-integration-tests [SPARK-20557][SQL] Only support TIMESTAMP WITH TIME ZONE for Oracle Dialect 2017-12-11 16:33:06 -08:00
flume [SPARK-22142][BUILD][STREAMING] Move Flume support behind a profile, take 2 2017-10-06 15:08:28 +01:00
flume-assembly [SPARK-20453] Bump master branch version to 2.3.0-SNAPSHOT 2017-04-24 21:48:04 -07:00
flume-sink [SPARK-20453] Bump master branch version to 2.3.0-SNAPSHOT 2017-04-24 21:48:04 -07:00
kafka-0-8 [SPARK-21893][BUILD][STREAMING][WIP] Put Kafka 0.8 behind a profile 2017-09-13 10:10:40 +01:00
kafka-0-8-assembly [SPARK-21276][CORE] Update lz4-java to the latest (v1.4.0) 2017-08-09 17:31:52 +02:00
kafka-0-10 [SPARK-22087][SPARK-14650][WIP][BUILD][REPL][CORE] Compile Spark REPL for Scala 2.12 + other 2.12 fixes 2017-09-24 09:40:13 +01:00
kafka-0-10-assembly [SPARK-21276][CORE] Update lz4-java to the latest (v1.4.0) 2017-08-09 17:31:52 +02:00
kafka-0-10-sql [SPARK-22660][BUILD] Use position() and limit() to fix ambiguity issue in scala-2.12 2017-12-07 10:04:04 -06:00
kinesis-asl [SPARK-14280][BUILD][WIP] Update change-version.sh and pom.xml to add Scala 2.12 profiles and enable 2.12 compilation 2017-09-01 19:21:21 +01:00
kinesis-asl-assembly [SPARK-20453] Bump master branch version to 2.3.0-SNAPSHOT 2017-04-24 21:48:04 -07:00
spark-ganglia-lgpl [SPARK-20453] Bump master branch version to 2.3.0-SNAPSHOT 2017-04-24 21:48:04 -07:00