Skip to content
This repository was archived by the owner on May 9, 2024. It is now read-only.

Commit 02cd849

Browse files
committed
Throw exception on empty projection.
Signed-off-by: ienkovich <[email protected]>
1 parent 8cc4941 commit 02cd849

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

omniscidb/QueryEngine/RelAlgDagBuilder.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2043,6 +2043,9 @@ class RelAlgDispatcher {
20432043
root_dag_builder,
20442044
getNodeColumnRefs(inputs[0].get())));
20452045
}
2046+
if (!exprs.size()) {
2047+
throw hdk::ir::QueryNotSupported("Empty projections are not allowed.");
2048+
}
20462049
const auto& fields = field(proj_ra, "fields");
20472050
return std::make_shared<hdk::ir::Project>(
20482051
std::move(exprs), strings_from_json_array(fields), inputs.front());

0 commit comments

Comments
 (0)