diff --git a/velox/substrait/SubstraitToVeloxExpr.cpp b/velox/substrait/SubstraitToVeloxExpr.cpp index 33342fe05e68..6021fae38322 100644 --- a/velox/substrait/SubstraitToVeloxExpr.cpp +++ b/velox/substrait/SubstraitToVeloxExpr.cpp @@ -370,8 +370,16 @@ SubstraitVeloxExprConverter::toVeloxExpr( case ::substrait::Expression_Literal::LiteralTypeCase::kNull: { auto veloxType = toVeloxType(subParser_->parseType(substraitLit.null())->type); - return std::make_shared( + if (veloxType->isShortDecimal()) { + return std::make_shared( + veloxType, variant::shortDecimal(std::nullopt, veloxType)); + } else if (veloxType->isLongDecimal()) { + return std::make_shared( + veloxType, variant::longDecimal(std::nullopt, veloxType)); + } else { + return std::make_shared( veloxType, variant::null(veloxType->kind())); + } } case ::substrait::Expression_Literal::LiteralTypeCase::kDate: return std::make_shared(