LuciferYang commented on code in PR #53568:
URL: https://github.com/apache/spark/pull/53568#discussion_r2641778760
##########
sql/connect/common/src/main/scala/org/apache/spark/sql/connect/SparkSession.scala:
##########
@@ -117,11 +117,16 @@ class SparkSession private[sql] (
private def createDataset[T](encoder: AgnosticEncoder[T], data:
Iterator[T]): Dataset[T] = {
newDataset(encoder) { builder =>
if (data.nonEmpty) {
- val threshold =
conf.get(SqlApiConf.LOCAL_RELATION_CACHE_THRESHOLD_KEY).toInt
- val maxChunkSizeRows =
conf.get(SqlApiConf.LOCAL_RELATION_CHUNK_SIZE_ROWS_KEY).toInt
- val maxChunkSizeBytes =
conf.get(SqlApiConf.LOCAL_RELATION_CHUNK_SIZE_BYTES_KEY).toInt
+ val confs = conf.getMap(
+ SqlApiConf.LOCAL_RELATION_CACHE_THRESHOLD_KEY,
+ SqlApiConf.LOCAL_RELATION_CHUNK_SIZE_ROWS_KEY,
+ SqlApiConf.LOCAL_RELATION_CHUNK_SIZE_BYTES_KEY,
+ SqlApiConf.LOCAL_RELATION_BATCH_OF_CHUNKS_SIZE_BYTES_KEY)
+ val threshold =
confs(SqlApiConf.LOCAL_RELATION_CACHE_THRESHOLD_KEY).toInt
+ val maxChunkSizeRows =
confs(SqlApiConf.LOCAL_RELATION_CHUNK_SIZE_ROWS_KEY).toInt
+ val maxChunkSizeBytes =
confs(SqlApiConf.LOCAL_RELATION_CHUNK_SIZE_BYTES_KEY).toInt
Review Comment:
From the definition, this is a longConf, so should we call `toLong` here?
https://github.com/apache/spark/blob/14cc174a4e4cf3fef598587749ee95e400be62ab/sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala#L6243-L6254
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]