We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
For example, if I use UInt8 constant for if condition then only one branch is evaluated:
SELECT if(1, 'success', throwIf(1, 'Executing FALSE branch')) ┌─'success'─┐ │ success │ └───────────┘ 1 rows in set. Elapsed: 0.003 sec.
But if I use some constant expression, then both branches are evaluated:
SELECT if(empty(''), 'success', throwIf(1, 'Executing FALSE branch')) 0 rows in set. Elapsed: 0.003 sec. Received exception from server (version 21.12.2): Code: 395. DB::Exception: Received from localhost:9000. DB::Exception: Executing FALSE branch: While processing if(empty(''), 'success', throwIf(1, 'Executing FALSE branch')). (FUNCTION_THROW_IF_VALUE_IS_NON_ZERO)
The text was updated successfully, but these errors were encountered:
hm,
SELECT if(empty(''), 1, sleep(1)); Elapsed: 0.001 sec. SELECT if(empty(''), 1, toDecimal64(1,2)/0); DB::Exception: Division by zero: SELECT if(x = '', 1, toDecimal64(1, 2) / 0) FROM ( SELECT materialize('') AS x ) DB::Exception: Division by zero:
Sorry, something went wrong.
Cannot be implemented until #23194.
kitaisreal
Successfully merging a pull request may close this issue.
For example, if I use UInt8 constant for if condition then only one branch is evaluated:
But if I use some constant expression, then both branches are evaluated:
The text was updated successfully, but these errors were encountered: