Skip to content

Commit

Permalink
support null type in hashagg
Browse files Browse the repository at this point in the history
  • Loading branch information
WangGuangxin committed Jan 3, 2025
1 parent b956a72 commit 7f2e54c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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]
}
}
}
4 changes: 4 additions & 0 deletions cpp/velox/substrait/VeloxSubstraitSignature.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down

0 comments on commit 7f2e54c

Please sign in to comment.