Skip to content

Commit

Permalink
Set default of includeEndStreamAction to false (#597)
Browse files Browse the repository at this point in the history
  • Loading branch information
linzhou-db authored Oct 11, 2024
1 parent e77f0f8 commit f8d5720
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ class DeltaSharingRestClient(
readerFeatures: String = "",
queryTablePaginationEnabled: Boolean = false,
maxFilesPerReq: Int = 100000,
endStreamActionEnabled: Boolean = true,
endStreamActionEnabled: Boolean = false,
enableAsyncQuery: Boolean = false,
asyncQueryPollIntervalMillis: Long = 10000L,
asyncQueryMaxDuration: Long = 600000L,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ object ConfUtils {
val USE_ASYNC_QUERY_DEFAULT = "false"

val INCLUDE_END_STREAM_ACTION_CONF = "spark.delta.sharing.query.includeEndStreamAction"
val INCLUDE_END_STREAM_ACTION_DEFAULT = "true"
val INCLUDE_END_STREAM_ACTION_DEFAULT = "false"

val TIMEOUT_CONF = "spark.delta.sharing.network.timeout"
val TIMEOUT_DEFAULT = "320s"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,20 @@ class ConfUtilsSuite extends SparkFunSuite {
}

test("includeEndStreamAction") {
assert(includeEndStreamAction(newConf()) == true)
assert(includeEndStreamAction(newConf()) == false)
assert(includeEndStreamAction(newConf(Map(INCLUDE_END_STREAM_ACTION_CONF -> "true"))) == true)
assert(includeEndStreamAction(newConf(Map(INCLUDE_END_STREAM_ACTION_CONF -> "false"))) == false)
assert(includeEndStreamAction(newConf(Map(INCLUDE_END_STREAM_ACTION_CONF -> "random"))) == true)
assert(includeEndStreamAction(newConf(Map(INCLUDE_END_STREAM_ACTION_CONF -> "rdm"))) == false)

assert(includeEndStreamAction(newSqlConf()) == true)
assert(includeEndStreamAction(newSqlConf()) == false)
assert(
includeEndStreamAction(newSqlConf(Map(INCLUDE_END_STREAM_ACTION_CONF -> "true"))) == true
)
assert(
includeEndStreamAction(newSqlConf(Map(INCLUDE_END_STREAM_ACTION_CONF -> "false"))) == false
)
intercept[IllegalArgumentException] {
assert(
includeEndStreamAction(newSqlConf(Map(INCLUDE_END_STREAM_ACTION_CONF -> "random"))) == false
)
includeEndStreamAction(newSqlConf(Map(INCLUDE_END_STREAM_ACTION_CONF -> "random")))
}.getMessage.contains(INCLUDE_END_STREAM_ACTION_CONF)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class TestDeltaSharingClient(
readerFeatures: String = "",
queryTablePaginationEnabled: Boolean = false,
maxFilesPerReq: Int = 10000,
endStreamActionEnabled: Boolean = true,
endStreamActionEnabled: Boolean = false,
enableAsyncQuery: Boolean = false,
asyncQueryPollIntervalMillis: Long = 1000L,
asyncQueryMaxDuration: Long = Long.MaxValue,
Expand Down

0 comments on commit f8d5720

Please sign in to comment.