Failing SQL Feature:
I'm not sure is it a bug or feature, but unfortunately it breaks our current behavior. After migration from 4.5 to 4.7 the query WITH events as (select * from table1) select t1 from events is parsed with select body including WithItems. In previous versions Select.getSelectBody() was returning select without WithItems.
So Select.getSelectBody (I know it is deprecated) will result different in 4.5 and 4.7:
4.5: select t1 from events
4.7 WITH events as (select * from table1) select t1 from events
I see that Select structure was changed:
In 4.5 there was separately selectBody and withItems
In 4.7 withItems are included into select
The question:
Can I get select without WithItems (like it was in 4.5)?
SQL Example:
- Simplified Query Example, focusing on the failing feature
WITH events as (
select * from table1
)
select t1
from events
Software Information:
Tips:
The same query has different structure in different versions of parser
4.5 Structure:
4.7 Structure:
Thanks in advance,
Regards, Serhii Zapalskyi
Failing SQL Feature:
I'm not sure is it a bug or feature, but unfortunately it breaks our current behavior. After migration from 4.5 to 4.7 the query
WITH events as (select * from table1) select t1 from eventsis parsed with select body including WithItems. In previous versions Select.getSelectBody() was returning select without WithItems.So Select.getSelectBody (I know it is deprecated) will result different in 4.5 and 4.7:
4.5:
select t1 from events4.7
WITH events as (select * from table1) select t1 from eventsI see that Select structure was changed:
In 4.5 there was separately
selectBodyandwithItemsIn 4.7
withItemsare included intoselectThe question:
Can I get select without WithItems (like it was in 4.5)?
SQL Example:
Software Information:
Tips:
The same query has different structure in different versions of parser
4.5 Structure:
4.7 Structure:
Thanks in advance,
Regards, Serhii Zapalskyi