-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Catch exception at joinCompiler lookup source #12117
Conversation
} | ||
catch (Exception e) { | ||
log.error(e, "Lookup source compile failed for types=%s error=%s", types, e); | ||
} | ||
} | ||
|
||
PagesHashStrategy hashStrategy = new SimplePagesHashStrategy( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should remove fallback instead (see: 1232d39). Why do you want to restore it? Is there a compilation failure? In case compilation failed user will get a perf hit without even knowing that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By this
try { |
A session parameter to allow fallback would be nice so that user can decide.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is a different code path for PagesHashStrategy
. We should remove it too (need to check before if we compile all cases).
A session parameter to allow fallback would be nice so that user can decide.
I'm not sure. It's really technical, so unless we see actual issues around that, I would not add a parameter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, if I understand correctly, Trino would not allow queries causing compilation failure so that users could notice it and rewrite their failed queries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Compilation failures are not for users to fix really.
👋 @miniway - this PR has become inactive. If you're still interested in working on it, please let us know, and we can try to get reviewers to help with that. We're working on closing out old and inactive PRs, so if you're too busy or this has too many merge conflicts to be worth picking back up, we'll be making another pass to close it out in a few weeks. |
+1 Slowness is better than query failure |
@weiatwork did you see any failures due to missing fallback? |
Yes, similar to OP, when there are a lot of columns in the query. With the fallback it can succeed |
I think it sounds like we may be interested in this PR, but because the author hasn't chimed in for a year, I'm going to go ahead and close this out. Feel free to re-open at any point, and if someone else wants to pick up the work, go for it. |
Thanks, I'll reopen it or create another PR with an enhancement. Personally a session property to allow it might be better than catching all compiler-errors. |
#23720 would solve (or mitigate) this issue. |
Description
This could fix when a join query failed to compile byte codes at Join query and use interpreter at the compilation failure by various reasons ex, too many involved columns.
We got the following error when hundreds of columns are used at the output columns in a JOIN query in presto 350.
PagesIndex.createPagesHashStrategy
catches compilation error atjoinCompiler.compilePagesHashStrategyFactory
and uses interpreter's one but not forjoinCompiler.compileLookupSourceFactory
Related issues, pull requests, and links
Documentation
(x) No documentation is needed.
( ) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.
Release notes
(x) No release notes entries required.
( ) Release notes entries required with the following suggested text: