From 265c417052b4bac39cb654b928673365d0689087 Mon Sep 17 00:00:00 2001
From: Zihan Li <63482288+sfc-gh-zli@users.noreply.github.com>
Date: Mon, 18 Sep 2023 15:17:23 -0700
Subject: [PATCH] SNOW-867390 update jdbc version (#51)
* zli/SNOW-867390 update jdbc version
* zli/SNOW-867390 update jdbc version
* update jdbc connection to base class
---
fips-pom.xml | 12 +-----------
pom.xml | 12 +-----------
.../snowpark/internal/ServerConnection.scala | 4 ++--
.../com/snowflake/snowpark/APIInternalSuite.scala | 2 +-
.../com/snowflake/snowpark/ParameterSuite.scala | 2 +-
5 files changed, 6 insertions(+), 26 deletions(-)
diff --git a/fips-pom.xml b/fips-pom.xml
index 8de4d815..999fde92 100644
--- a/fips-pom.xml
+++ b/fips-pom.xml
@@ -37,7 +37,7 @@
2.12.11
2.12
4.2.0
- 3.13.32
+ 3.14.1
${scala.compat.version}
Snowpark ${project.version}
1.64
@@ -46,16 +46,6 @@
2.13.4.2
-
-
- osgeo
- OSGeo Release Repository
- https://repo.osgeo.org/repository/release/
- false
- true
-
-
-
org.scala-lang
diff --git a/pom.xml b/pom.xml
index 6c12553b..b06a1f60 100644
--- a/pom.xml
+++ b/pom.xml
@@ -37,7 +37,7 @@
2.12.11
2.12
4.2.0
- 3.13.32
+ 3.14.1
${scala.compat.version}
Snowpark ${project.version}
1.4.0
@@ -48,16 +48,6 @@
2.13.4.2
-
-
- osgeo
- OSGeo Release Repository
- https://repo.osgeo.org/repository/release/
- false
- true
-
-
-
org.scala-lang
diff --git a/src/main/scala/com/snowflake/snowpark/internal/ServerConnection.scala b/src/main/scala/com/snowflake/snowpark/internal/ServerConnection.scala
index 72210731..64e8cfb4 100644
--- a/src/main/scala/com/snowflake/snowpark/internal/ServerConnection.scala
+++ b/src/main/scala/com/snowflake/snowpark/internal/ServerConnection.scala
@@ -801,7 +801,7 @@ private[snowpark] class ServerConnection(
}
private[snowpark] def isDone(queryID: String): Boolean =
- !QueryStatus.isStillRunning(connection.getSfSession.getQueryStatus(queryID))
+ !QueryStatus.isStillRunning(connection.getSFBaseSession.getQueryStatus(queryID))
private[snowpark] def waitForQueryDone(
queryID: String,
@@ -812,7 +812,7 @@ private[snowpark] class ServerConnection(
val retryPattern = Array(1, 1, 2, 3, 4, 8, 10)
def getSeepTime(retry: Int) = retryPattern(retry.min(retryPattern.length - 1)) * 500
- val session = connection.getSfSession
+ val session = connection.getSFBaseSession
var qs = session.getQueryStatus(queryID)
var retry = 0
var lastLogTime = 0
diff --git a/src/test/scala/com/snowflake/snowpark/APIInternalSuite.scala b/src/test/scala/com/snowflake/snowpark/APIInternalSuite.scala
index 45fbe126..29111bf9 100644
--- a/src/test/scala/com/snowflake/snowpark/APIInternalSuite.scala
+++ b/src/test/scala/com/snowflake/snowpark/APIInternalSuite.scala
@@ -303,7 +303,7 @@ class APIInternalSuite extends TestData {
*/
test("Test that all params are correctly propagated to JDBC session") {
val session2 = Session.builder.configFile(defaultProfile).config("ROLE", "PUBLIC").create
- val jdbcSession = session2.conn.connection.getSfSession
+ val jdbcSession = session2.conn.connection.getSFBaseSession
val propertySet = jdbcSession.getConnectionPropertiesMap.keySet()
assert(propertySet.contains(SFSessionProperty.DATABASE))
assert(propertySet.contains(SFSessionProperty.SCHEMA))
diff --git a/src/test/scala/com/snowflake/snowpark/ParameterSuite.scala b/src/test/scala/com/snowflake/snowpark/ParameterSuite.scala
index 8ee5dddd..75365e5b 100644
--- a/src/test/scala/com/snowflake/snowpark/ParameterSuite.scala
+++ b/src/test/scala/com/snowflake/snowpark/ParameterSuite.scala
@@ -31,7 +31,7 @@ class ParameterSuite extends SNTestBase {
.create
assert(
- sessionWithApplicationName.conn.connection.getSfSession.getConnectionPropertiesMap
+ sessionWithApplicationName.conn.connection.getSFBaseSession.getConnectionPropertiesMap
.get(SFSessionProperty.APPLICATION) == applicationName)
}