From 058de7e8936b34d3476b5139965d3add982e10ca Mon Sep 17 00:00:00 2001 From: liangyongyuan Date: Wed, 24 Jul 2024 19:55:57 +0800 Subject: [PATCH] fix test --- cpp/velox/substrait/SubstraitToVeloxPlanValidator.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cpp/velox/substrait/SubstraitToVeloxPlanValidator.cc b/cpp/velox/substrait/SubstraitToVeloxPlanValidator.cc index 39d9b9e26c10..dc5b5e4117b1 100644 --- a/cpp/velox/substrait/SubstraitToVeloxPlanValidator.cc +++ b/cpp/velox/substrait/SubstraitToVeloxPlanValidator.cc @@ -482,7 +482,12 @@ bool SubstraitToVeloxPlanValidator::validate(const ::substrait::GenerateRel& gen LOG_VALIDATION_MSG("Input validation fails in GenerateRel."); return false; } - expressions.emplace_back(exprConverter_->toVeloxExpr(generateRel.generator(), rowType)); + auto generator = generateRel.generator().scalar_function(); + for (const auto& argument : generator.arguments()) { + if (argument.has_value()) { + expressions.emplace_back(exprConverter_->toVeloxExpr(argument.value(), rowType)); + } + } // Try to compile the expressions. If there is any unregistred funciton or // mismatched type, exception will be thrown. exec::ExprSet exprSet(std::move(expressions), execCtx_);