JSqlParser
JSqlParser copied to clipboard
Support complex expressions in select clause
The SELECT clause can contain complex expressions, for example "(condition) OR (condition)", which actually returns a boolean.
Sample query:
SELECT (CASE WHEN col IS NULL THEN False ELSE True END) OR (CASE WHEN col2 IS NULL THEN False ELSE True END) FROM tbl
Adding support for such complex conditions in the SELECT clause.
Greetings. I have provided a similar PR already which is pending since a few days.Sent from my Galaxy -------- Original message --------From: "Tomer Shay (Shimshi)" @.> Date: 10/11/2021 20:16 (GMT+01:00) To: JSQLParser/JSqlParser @.> Cc: Subscribed @.***> Subject: [JSQLParser/JSqlParser] Support complex expressions in select clause (PR #1412) The SELECT clause can contain complex expressions, for example "(condition) OR (condition)", which actually returns a boolean. Sample query: SELECT (CASE WHEN col IS NULL THEN False ELSE True END) OR (CASE WHEN col2 IS NULL THEN False ELSE True END) FROM tbl Adding support for such complex conditions in the SELECT clause.
You can view, comment on, or merge this pull request online at: https://github.com/JSQLParser/JSqlParser/pull/1412
Commit Summary
Support complex expressions in select clause
File Changes (2 files)
M
src/main/jjtree/net/sf/jsqlparser/parser/JSqlParserCC.jjt
(2)
M
src/test/java/net/sf/jsqlparser/statement/select/SelectTest.java
(6)
Patch Links:
https://github.com/JSQLParser/JSqlParser/pull/1412.patch https://github.com/JSQLParser/JSqlParser/pull/1412.diff
—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or unsubscribe.Triage notifications on the go with GitHub Mobile for iOS or Android.
@tomershay: I would like to close this PR since a similar PR has been merged quite a time ago and this challenge should be resolved.