Skip to content

Commit

Permalink
update jdbc connection to base class
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-zli committed Sep 18, 2023
1 parent 249881f commit c30ef8e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion src/test/scala/com/snowflake/snowpark/ParameterSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class ParameterSuite extends SNTestBase {
.create

assert(
sessionWithApplicationName.conn.connection.getSfSession.getConnectionPropertiesMap
sessionWithApplicationName.conn.connection.getSFBaseSession.getConnectionPropertiesMap
.get(SFSessionProperty.APPLICATION) == applicationName)
}

Expand Down

0 comments on commit c30ef8e

Please sign in to comment.