diff --git a/.github/workflows/ClusterTest.yml b/.github/workflows/ClusterTest.yml index 656f3a65..cd548e43 100644 --- a/.github/workflows/ClusterTest.yml +++ b/.github/workflows/ClusterTest.yml @@ -23,7 +23,7 @@ jobs: TEST_SCALA_VERSION: '2.12' TEST_COMPILE_SCALA_VERSION: '2.12.11' TEST_SPARK_CONNECTOR_VERSION: '2.15.0' - TEST_JDBC_VERSION: '3.13.30' + TEST_JDBC_VERSION: '3.16.0' steps: - uses: actions/checkout@v2 diff --git a/.gitignore b/.gitignore index f40f7e18..80157db4 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,8 @@ ClusterTest/target/ ClusterTest/project/target ClusterTest/src/main/python/*.pyc .bsp/ +.bloop/ +.metals/ +.vscode/ +project/metals.sbt +project/project diff --git a/ClusterTest/build.sbt b/ClusterTest/build.sbt index da670026..de1b2859 100644 --- a/ClusterTest/build.sbt +++ b/ClusterTest/build.sbt @@ -37,11 +37,7 @@ lazy val root = project.withId("spark-snowflake").in(file(".")) "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots", libraryDependencies ++= Seq( "net.snowflake" % "snowflake-ingest-sdk" % "0.10.8", - "net.snowflake" % "snowflake-jdbc" % "3.13.30", - // "net.snowflake" %% "spark-snowflake" % "2.8.0-spark_3.0", - // "com.google.guava" % "guava" % "14.0.1" % Test, - // "org.scalatest" %% "scalatest" % "3.0.5" % Test, - // "org.mockito" % "mockito-core" % "1.10.19" % Test, + "net.snowflake" % "snowflake-jdbc" % "3.16.0", "org.apache.commons" % "commons-lang3" % "3.5" % "provided, runtime", "org.apache.spark" %% "spark-core" % testSparkVersion % "provided, runtime", "org.apache.spark" %% "spark-sql" % testSparkVersion % "provided, runtime", diff --git a/build.sbt b/build.sbt index 45fbc922..e3e7ce1d 100644 --- a/build.sbt +++ b/build.sbt @@ -60,7 +60,7 @@ lazy val root = project.withId("spark-snowflake").in(file(".")) "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots", libraryDependencies ++= Seq( "net.snowflake" % "snowflake-ingest-sdk" % "0.10.8", - "net.snowflake" % "snowflake-jdbc" % "3.14.4", + "net.snowflake" % "snowflake-jdbc" % "3.16.0", "org.scalatest" %% "scalatest" % "3.1.1" % Test, "org.mockito" % "mockito-core" % "1.10.19" % Test, "org.apache.commons" % "commons-lang3" % "3.5" % "provided", diff --git a/src/main/scala/net/snowflake/spark/snowflake/SnowflakeJDBCWrapper.scala b/src/main/scala/net/snowflake/spark/snowflake/SnowflakeJDBCWrapper.scala index bdeaeedc..ca3f6ec2 100644 --- a/src/main/scala/net/snowflake/spark/snowflake/SnowflakeJDBCWrapper.scala +++ b/src/main/scala/net/snowflake/spark/snowflake/SnowflakeJDBCWrapper.scala @@ -281,7 +281,6 @@ private[snowflake] class JDBCWrapper { // Snowflake-todo: Verify all types. val answer = sqlType match { // scalastyle:off - case java.sql.Types.ARRAY => null case java.sql.Types.BIGINT => if (signed) { LongType @@ -340,6 +339,8 @@ private[snowflake] class JDBCWrapper { // case java.sql.Types.VARBINARY => BinaryType case java.sql.Types.VARCHAR => StringType case java.sql.Types.BINARY => BinaryType + case java.sql.Types.STRUCT => StringType + case java.sql.Types.ARRAY => StringType case _ => null // scalastyle:on } diff --git a/src/main/scala/net/snowflake/spark/snowflake/Utils.scala b/src/main/scala/net/snowflake/spark/snowflake/Utils.scala index 7b45472d..34070f0f 100644 --- a/src/main/scala/net/snowflake/spark/snowflake/Utils.scala +++ b/src/main/scala/net/snowflake/spark/snowflake/Utils.scala @@ -60,7 +60,7 @@ object Utils { /** * The certified JDBC version to work with this spark connector version. */ - val CERTIFIED_JDBC_VERSION = "3.14.4" + val CERTIFIED_JDBC_VERSION = "3.16.0" /** * Important: