diff --git a/src/expression/binary_op.cpp b/src/expression/binary_op.cpp index 6082c94..a5adb43 100644 --- a/src/expression/binary_op.cpp +++ b/src/expression/binary_op.cpp @@ -236,54 +236,6 @@ std::shared_ptr add(const Context &ctx, ThreadId thread_id, return createArrowColumnVector(result_type, res.make_array()); } -template struct Equal { - template ::value || - !arrow::is_number_type::value> * = - nullptr> - std::shared_ptr - operator()(const Context &ctx, ThreadId thread_id, LeftColumn &&left, - RightColumn &&right) const { - arrow::compute::ExecContext context( - ctx.memory_resource->preConcatenate(thread_id)); - const auto &res = CURA_GET_ARROW_RESULT(arrow::compute::Compare( - left->arrow(), right->arrow(), - arrow::compute::CompareOptions(arrow::compute::CompareOperator::EQUAL), - &context)); - CURA_ASSERT(res.kind() == arrow::Datum::ARRAY, - "Binary op result must be an arrow array"); - return createArrowColumnVector(result_type, res.make_array()); - } - - template ::value && - arrow::is_number_type::value> * = - nullptr> - std::shared_ptr - operator()(const Context &ctx, ThreadId thread_id, LeftColumn &&left, - RightColumn &&right) const { - using CommonCType = std::common_type_t; - arrow::compute::ExecContext context( - ctx.memory_resource->preConcatenate(thread_id)); - const auto &common_type = arrow::CTypeTraits::type_singleton(); - const auto &left_casted = CURA_GET_ARROW_RESULT( - arrow::compute::Cast(left->arrow(), common_type, - arrow::compute::CastOptions::Safe(), &context)); - const auto &right_casted = CURA_GET_ARROW_RESULT( - arrow::compute::Cast(right->arrow(), common_type)); - const auto &res = CURA_GET_ARROW_RESULT(arrow::compute::Compare( - left_casted, right_casted, - arrow::compute::CompareOptions(arrow::compute::CompareOperator::EQUAL), - &context)); - CURA_ASSERT(res.kind() == arrow::Datum::ARRAY, - "Binary op result must be an arrow array"); - return createArrowColumnVector(result_type, res.make_array()); - } - - const DataType &result_type; -}; - template struct Compare { @@ -332,15 +284,6 @@ struct Compare { const DataType &result_type; }; -template -std::shared_ptr eq(const Context &ctx, ThreadId thread_id, - LeftColumn &&left, RightColumn &&right, - const DataType &result_type) { - Equal eq{result_type}; - return dispatchDualTypes(ctx, thread_id, std::forward(left), - std::forward(right), eq); -} - template std::shared_ptr compare(const Context &ctx, ThreadId thread_id,