Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -646,4 +646,12 @@ object VeloxConfig {
.internal()
.bytesConf(ByteUnit.BYTE)
.createWithDefaultString("10MB")

val VELOX_MAX_COMPILED_REGEXES =
buildConf("spark.gluten.sql.columnar.backend.velox.maxCompiledRegexes")
.doc(
"Controls maximum number of compiled regular expression patterns per function " +
"instance per thread of execution.")
.intConf
.createWithDefault(100)
}
3 changes: 3 additions & 0 deletions cpp/velox/compute/WholeStageResultIterator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,9 @@ std::unordered_map<std::string, std::string> WholeStageResultIterator::getQueryC
configs[velox::core::QueryConfig::kSparkJsonIgnoreNullFields] =
std::to_string(veloxCfg_->get<bool>(kSparkJsonIgnoreNullFields, true));

configs[velox::core::QueryConfig::kExprMaxCompiledRegexes] =
std::to_string(veloxCfg_->get<int32_t>(kExprMaxCompiledRegexes, 100));

#ifdef GLUTEN_ENABLE_GPU
configs[cudf_velox::kCudfEnabled] = std::to_string(veloxCfg_->get<bool>(kCudfEnabled, false));
#endif
Expand Down
2 changes: 2 additions & 0 deletions cpp/velox/config/VeloxConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ const uint64_t kVeloxMemReclaimMaxWaitMsDefault = 3600000; // 60min
const std::string kHiveConnectorId = "test-hive";
const std::string kVeloxCacheEnabled = "spark.gluten.sql.columnar.backend.velox.cacheEnabled";

const std::string kExprMaxCompiledRegexes = "spark.gluten.sql.columnar.backend.velox.maxCompiledRegexes";

// memory cache
const std::string kVeloxMemCacheSize = "spark.gluten.sql.columnar.backend.velox.memCacheSize";
const uint64_t kVeloxMemCacheSizeDefault = 1073741824; // 1G
Expand Down
Loading