diff --git a/velox/expression/ConstantExpr.cpp b/velox/expression/ConstantExpr.cpp index 28c43048be338..381d93741e45e 100644 --- a/velox/expression/ConstantExpr.cpp +++ b/velox/expression/ConstantExpr.cpp @@ -162,6 +162,7 @@ void appendSqlLiteral( case TypeKind::TINYINT: case TypeKind::SMALLINT: case TypeKind::BIGINT: + case TypeKind::HUGEINT: case TypeKind::TIMESTAMP: case TypeKind::REAL: case TypeKind::DOUBLE: diff --git a/velox/expression/tests/ExpressionFuzzer.cpp b/velox/expression/tests/ExpressionFuzzer.cpp index 94306c0c76d86..5f01fb121584b 100644 --- a/velox/expression/tests/ExpressionFuzzer.cpp +++ b/velox/expression/tests/ExpressionFuzzer.cpp @@ -447,8 +447,12 @@ bool isSupportedSignature( const exec::FunctionSignature& signature, bool enableComplexType, bool enableDecimalType) { + // When enableComplexType is disabled, not supporting complex functions. + const bool useComplexType = + (useTypeName(signature, "array") || useTypeName(signature, "map") || + useTypeName(signature, "row")); // When enableDecimalType is disabled, not supporting decimal functions. - const bool useDecimal = + const bool useDecimalType = (useTypeName(signature, "long_decimal") || useTypeName(signature, "short_decimal") || useTypeName(signature, "decimal")); @@ -458,7 +462,8 @@ bool isSupportedSignature( useTypeName(signature, "opaque") || useTypeName(signature, "timestamp with time zone") || useTypeName(signature, "interval day to second") || - (!enableDecimalType && useDecimal) || + (!enableDecimalType && useDecimalType) || + (!enableComplexType && useComplexType) || (enableComplexType && useTypeName(signature, "unknown"))); } diff --git a/velox/expression/tests/utils/ArgumentTypeFuzzer.cpp b/velox/expression/tests/utils/ArgumentTypeFuzzer.cpp index 838c5ab50f760..4eb9ce3449059 100644 --- a/velox/expression/tests/utils/ArgumentTypeFuzzer.cpp +++ b/velox/expression/tests/utils/ArgumentTypeFuzzer.cpp @@ -47,16 +47,6 @@ void ArgumentTypeFuzzer::determineUnboundedIntegerVariables() { continue; } - // When variable name is 'precision' and result type is decimal, input type - // is regarded the same with the result type. - if (variableName == "precision" && returnType_ && - returnType_->isDecimal()) { - const auto [precision, scale] = getDecimalPrecisionScale(*returnType_); - integerVariablesBindings_["precision"] = precision; - integerVariablesBindings_["scale"] = scale; - continue; - } - // When decimal function is registered as vector function, the variable name // contains 'precision' like 'a_precision'. if (auto pos = variableName.find("precision"); pos != std::string::npos) {