diff --git a/backends-velox/src/test/scala/org/apache/gluten/execution/MiscOperatorSuite.scala b/backends-velox/src/test/scala/org/apache/gluten/execution/MiscOperatorSuite.scala index 42e3e0bcc77a..107d096e7851 100644 --- a/backends-velox/src/test/scala/org/apache/gluten/execution/MiscOperatorSuite.scala +++ b/backends-velox/src/test/scala/org/apache/gluten/execution/MiscOperatorSuite.scala @@ -1985,4 +1985,10 @@ class MiscOperatorSuite extends VeloxWholeStageTransformerSuite with AdaptiveSpa } } } + + test("support null type in aggregate") { + runQueryAndCompare("SELECT max(null), min(null) from range(10)".stripMargin) { + checkGlutenOperatorMatch[HashAggregateExecTransformer] + } + } } diff --git a/cpp/velox/substrait/VeloxSubstraitSignature.cc b/cpp/velox/substrait/VeloxSubstraitSignature.cc index e1f716ae2088..a68870f653ab 100644 --- a/cpp/velox/substrait/VeloxSubstraitSignature.cc +++ b/cpp/velox/substrait/VeloxSubstraitSignature.cc @@ -159,6 +159,10 @@ TypePtr VeloxSubstraitSignature::fromSubstraitSignature(const std::string& signa return DATE(); } + if (signature == "nothing") { + return UNKNOWN(); + } + auto startWith = [](const std::string& str, const std::string& prefix) { return str.size() >= prefix.size() && str.substr(0, prefix.size()) == prefix; };