Skip to content

ISSUES-3885 temporarily disable predicate optimization for order by#3890

Merged
alexey-milovidov merged 6 commits intoClickHouse:masterfrom
zhang2014:fix/ISSUES-3885
Feb 3, 2019
Merged

ISSUES-3885 temporarily disable predicate optimization for order by#3890
alexey-milovidov merged 6 commits intoClickHouse:masterfrom
zhang2014:fix/ISSUES-3885

Conversation

@zhang2014
Copy link
Copy Markdown
Contributor

#3885
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

Category:

  • Bug Fix

Short description (up to few sentences):

temporarily disable predicate optimization for order by

Detailed description (optional):

Because the result of some function depend on the order of data, predicates are not optimized when ORDER BY exists in a subquery.

@zhang2014
Copy link
Copy Markdown
Contributor Author

Maybe we should tag these functions in the function interface?
For example:

CREATE TABLE order_view AS SELECT * FROM table_xxx ORDER BY create_time;
SELECT * FROM order_view WHERE name = 'XXX' AND create_time = 'XXX';

In this case, optimization makes sense.

@alexey-milovidov
Copy link
Copy Markdown
Member

Yes, we should mark them as isStateful (suggested property name) in IFunctionBase.

@zhang2014
Copy link
Copy Markdown
Contributor Author

Ok, I'll try to mark them.

@zhang2014
Copy link
Copy Markdown
Contributor Author

The failure test was fixed in a40f8f9

@alexey-milovidov alexey-milovidov merged commit 91d0d40 into ClickHouse:master Feb 3, 2019
@alexey-milovidov
Copy link
Copy Markdown
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants