You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
select foo, bar
from baz
where foo like'abd%'or like_escape(foo, 'ada%', '!')
or foo not like'abd%'or not_like_escape(foo, 'ada%', '!')
or foo ilike 'efg%'or ilike_escape(foo, 'ada%', '!')
or foo not ilike 'efg%'or not_ilike_escape(foo, 'ada%', '!');
In the following excerpt, every other line has been converted to a function. Why, does it make more sense? If not, is there a way to disable that?
or like_escape(foo, 'ada%', '!')
or foo not like'abd%'or not_like_escape(foo, 'ada%', '!')
or foo ilike 'efg%'or ilike_escape(foo, 'ada%', '!')
or foo not ilike 'efg%'or not_ilike_escape(foo, 'ada%', '!')
The text was updated successfully, but these errors were encountered:
This is because cockroach's parser converts these to a function call node instead of leaving them in their native form with an exact representation. Ideally it would do what you describe. Cockroach could be changed so that the parser can fully roundtrip these, and its planner is the thing that converts them some lower level function call or whatever. I no longer work on the cockroach code (where the actual AST -> pretty printing logic occurs), so I'm not able to make this change.
Input:
output (
cat file.sql | ./main --align --casemode lower
):In the following excerpt, every other line has been converted to a function. Why, does it make more sense? If not, is there a way to disable that?
The text was updated successfully, but these errors were encountered: