-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove duplicate tests from test_const_evaluator_scalar_functions
#1727
Comments
Another that I find // volatile / stable functions should not be evaluated
// rand() + (1 + 2) --> rand() + 3
let fun = BuiltinScalarFunction::Random;
assert_eq!(fun.volatility(), Volatility::Volatile);
let rand = Expr::ScalarFunction { args: vec![], fun };
let expr = rand.clone() + (lit(1) + lit(2));
let expected = rand + lit(3);
test_evaluate(expr, expected);
// parenthesization matters: can't rewrite
// (rand() + 1) + 2 --> (rand() + 1) + 2)
let fun = BuiltinScalarFunction::Random;
assert_eq!(fun.volatility(), Volatility::Volatile); We test |
test_const_evaluator_scalar_functions
test_const_evaluator_scalar_functions
Hey @HaoYang670 can I work on this issue? |
Sure. Thank you, @bridyash13 |
I found the problem to be a very simple one, and it didn't seem to be progressing. so I fix it. BTW, I search the |
I make a stupid mistake....ignored the supplement following.😅 I will add another PR...... |
Describe the bug
I find that we have 2 same tests:
https://github.com/apache/arrow-datafusion/blob/master/datafusion/src/optimizer/simplify_expressions.rs#L1026-L1040
To Reproduce
Expected behavior
Remove one of the test or add some comment about why we need 2 same tests.
Additional context
The text was updated successfully, but these errors were encountered: