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

Commit dca67ff

Browse files
AndreyPavlenkoienkovich
authored andcommitted
FIX-#673: SIGABRT on BIT_NOT operation
Fixes #673 Signed-off-by: Andrey Pavlenko <[email protected]>
1 parent 4f37224 commit dca67ff

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

omniscidb/QueryEngine/RelAlgDagBuilder.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,12 @@ hdk::ir::ExprPtr makeUOper(hdk::ir::OpType op,
500500
case hdk::ir::OpType::kNot:
501501
return std::make_shared<hdk::ir::UOper>(
502502
ctx.boolean(arg->type()->nullable()), op, arg);
503+
case hdk::ir::OpType::kBwNot:
504+
if (!arg->type()->isInteger()) {
505+
throw std::runtime_error(
506+
"Only integer expressions are allowed for BW_NOT operation.");
507+
}
508+
return std::make_shared<hdk::ir::UOper>(arg->type(), op, arg);
503509
case hdk::ir::OpType::kIsNull:
504510
return std::make_shared<hdk::ir::UOper>(ctx.boolean(false), op, arg);
505511
case hdk::ir::OpType::kMinus: {

0 commit comments

Comments
 (0)