Skip to content

Commit

Permalink
fix: avoid regression
Browse files Browse the repository at this point in the history
  • Loading branch information
Weijun-H committed Mar 31, 2024
1 parent e058945 commit a77e882
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
1 change: 1 addition & 0 deletions datafusion/functions/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ macro_rules! downcast_arg {
/// $GNAME: a singleton instance of the UDF
/// $NAME: the name of the function
/// $UNARY_FUNC: the unary function to apply to the argument
/// $MONOTONIC_FUNC: the monotonicity of the function
macro_rules! make_math_unary_udf {
($UDF:ident, $GNAME:ident, $NAME:ident, $UNARY_FUNC:ident, $MONOTONICITY:expr) => {
make_udf_function!($NAME::$UDF, $GNAME, $NAME);
Expand Down
8 changes: 4 additions & 4 deletions datafusion/functions/src/math/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ make_math_unary_udf!(AcosFunc, ACOS, acos, acos, None);
make_math_unary_udf!(AsinFunc, ASIN, asin, asin, None);
make_math_unary_udf!(TanFunc, TAN, tan, tan, None);

make_math_unary_udf!(AtanhFunc, ATANH, atanh, atanh);
make_math_unary_udf!(AsinhFunc, ASINH, asinh, asinh);
make_math_unary_udf!(AcoshFunc, ACOSH, acosh, acosh);
make_math_unary_udf!(AtanFunc, ATAN, atan, atan);
make_math_unary_udf!(AtanhFunc, ATANH, atanh, atanh, Some(vec![Some(true)]));
make_math_unary_udf!(AsinhFunc, ASINH, asinh, asinh, Some(vec![Some(true)]));
make_math_unary_udf!(AcoshFunc, ACOSH, acosh, acosh, Some(vec![Some(true)]));
make_math_unary_udf!(AtanFunc, ATAN, atan, atan, Some(vec![Some(true)]));

// Export the functions out of this package, both as expr_fn as well as a list of functions
export_functions!(
Expand Down
7 changes: 3 additions & 4 deletions datafusion/sqllogictest/test_files/order.slt
Original file line number Diff line number Diff line change
Expand Up @@ -527,10 +527,9 @@ Sort: atan_c11 ASC NULLS LAST
----TableScan: aggregate_test_100 projection=[c11]
physical_plan
SortPreservingMergeExec: [atan_c11@0 ASC NULLS LAST]
--SortExec: expr=[atan_c11@0 ASC NULLS LAST]
----ProjectionExec: expr=[atan(c11@0) as atan_c11]
------RepartitionExec: partitioning=RoundRobinBatch(4), input_partitions=1
--------CsvExec: file_groups={1 group: [[WORKSPACE_ROOT/testing/data/csv/aggregate_test_100.csv]]}, projection=[c11], output_ordering=[c11@0 ASC NULLS LAST], has_header=true
--ProjectionExec: expr=[atan(c11@0) as atan_c11]
----RepartitionExec: partitioning=RoundRobinBatch(4), input_partitions=1
------CsvExec: file_groups={1 group: [[WORKSPACE_ROOT/testing/data/csv/aggregate_test_100.csv]]}, projection=[c11], output_ordering=[c11@0 ASC NULLS LAST], has_header=true

query TT
EXPLAIN SELECT CEIL(c11) as ceil_c11
Expand Down

0 comments on commit a77e882

Please sign in to comment.