From 27370a922a2a6e6e6378e29905aae21afbe0f5f9 Mon Sep 17 00:00:00 2001 From: felixybw Date: Fri, 22 Mar 2024 18:12:14 -0400 Subject: [PATCH] add to scala --- .../scala/io/glutenproject/GlutenConfig.scala | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/shims/common/src/main/scala/io/glutenproject/GlutenConfig.scala b/shims/common/src/main/scala/io/glutenproject/GlutenConfig.scala index 48e37cdb3abc..1b463af6b462 100644 --- a/shims/common/src/main/scala/io/glutenproject/GlutenConfig.scala +++ b/shims/common/src/main/scala/io/glutenproject/GlutenConfig.scala @@ -252,6 +252,12 @@ class GlutenConfig(conf: SQLConf) extends Logging { def veloxSpillFileSystem: String = conf.getConf(COLUMNAR_VELOX_SPILL_FILE_SYSTEM) + def veloxMaxSpillFileSize: Long = conf.getConf(COLUMNAR_VELOX_MAX_SPILL_RUN_ROWS) + + def veloxMaxSpillFileSize: Long = conf.getConf(COLUMNAR_VELOX_MAX_SPILL_BYTES) + + def veloxMaxSpillFileSize: Long = conf.getConf(COLUMNAR_VELOX_MAX_SPILL_WRITE_BUFFER_SIZE) + def veloxBloomFilterExpectedNumItems: Long = conf.getConf(COLUMNAR_VELOX_BLOOM_FILTER_EXPECTED_NUM_ITEMS) @@ -1245,6 +1251,27 @@ object GlutenConfig { .checkValues(Set("local", "heap-over-local")) .createWithDefaultString("local") + val COLUMNAR_VELOX_MAX_SPILL_RUN_ROWS = + buildConf("spark.gluten.sql.columnar.backend.velox.MaxSpillRunRows") + .internal() + .doc("The maximum row size of a single spill run") + .bytesConf(ByteUnit.BYTE) + .createWithDefaultString("12M") + + val COLUMNAR_VELOX_MAX_SPILL_BYTES = + buildConf("spark.gluten.sql.columnar.backend.velox.MaxSpillBytes") + .internal() + .doc("The maximum file size of a query") + .bytesConf(ByteUnit.BYTE) + .createWithDefaultString("100G") + + val COLUMNAR_VELOX_MAX_SPILL_WRITE_BUFFER_SIZE = + buildConf("spark.gluten.sql.columnar.backend.velox.spillWriteBufferSize") + .internal() + .doc("The maximum write buffer size") + .bytesConf(ByteUnit.BYTE) + .createWithDefaultString("4M") + val MAX_PARTITION_PER_WRITERS_SESSION = buildConf("spark.gluten.sql.columnar.backend.velox.maxPartitionsPerWritersSession") .internal()