zhztheplayer commented on code in PR #6670:
URL: https://github.com/apache/incubator-gluten/pull/6670#discussion_r1701389863
##########
shims/common/src/main/scala/org/apache/gluten/GlutenConfig.scala:
##########
@@ -305,14 +305,32 @@ class GlutenConfig(conf: SQLConf) extends Logging {
def veloxBloomFilterMaxNumBits: Long =
conf.getConf(COLUMNAR_VELOX_BLOOM_FILTER_MAX_NUM_BITS)
- def veloxCoalesceBatchesBeforeShuffle: Boolean =
- conf.getConf(COLUMNAR_VELOX_COALESCE_BATCHES_BEFORE_SHUFFLE)
+ case class ResizeRange(min: Int, max: Int) {
+ assert(max >= min)
+ assert(min > 0, "Min batch size should be larger than 0")
+ assert(max > 0, "Max batch size should be larger than 0")
+ }
+
+ private object ResizeRange {
+ def parse(pattern: String): ResizeRange = {
+ assert(pattern.count(_ == '~') == 1, s"Invalid range pattern for batch
resizing: $pattern")
+ val splits = pattern.split('~')
+ assert(splits.length == 2)
+ ResizeRange(splits(0).toInt, splits(1).toInt)
Review Comment:
Any reason doing such check?
To me it's not necessary to create tight coupling between this range and
`COLUMNAR_MAX_BATCH_SIZE`, the former's value was just derived from the latter.
--
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]