Skip to content

Commit

Permalink
Fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinyhZou committed Dec 12, 2023
1 parent 05ef6ca commit d4852e4
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion cpp-ch/local-engine/Parser/scalar_function_parser/floor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,17 @@ class FunctionParserFloor : public FunctionParser
throw Exception(ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH, "Function {} requires exactly one arguments", getName());

const auto * first_arg = parsed_args[0];
const auto * floor_node = toFunctionNode(actions_dag, "floor", {first_arg});
const ActionsDAG::Node * floor_node;
if (parsed_args.size() == 1)
floor_node = toFunctionNode(actions_dag, "floor", {first_arg});
else
{
const auto * second_arg = parsed_args[1];
floor_node = toFunctionNode(actions_dag, "floor", {first_arg, second_arg});
}
if (!isNativeNumber(removeNullable(first_arg->result_type)))
return convertNodeTypeIfNeeded(substrait_func, floor_node, actions_dag);

auto nullable_result_type = makeNullable(floor_node->result_type);
const auto * null_const_node = addColumnToActionsDAG(actions_dag, nullable_result_type, Field());
const auto * is_nan_node = toFunctionNode(actions_dag, "isNaN", {first_arg});
Expand Down

0 comments on commit d4852e4

Please sign in to comment.