JSqlParser icon indicating copy to clipboard operation
JSqlParser copied to clipboard

Support complex expressions in select clause

Open tomershay opened this issue 4 years ago • 1 comments

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.

tomershay avatar Nov 10 '21 19:11 tomershay

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.

manticore-projects avatar Nov 10 '21 19:11 manticore-projects

@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.

manticore-projects avatar Dec 09 '22 10:12 manticore-projects