chore(hogql): Use the C++ parser in local dev #18112
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
It's time to actually start using the C++ parser.
Changes
Before we do that in production, I would prefer to add more NULL guards to
parser.cpp
(we don't want to run into the billion-dollar mistake), just so we're sure the production processes can't segfault (this should never happen in normal operation, but e.g. if a pod runs out of memory, there is currently a risk that the parser can't allocate a Python object, and currently the whole Python process crashes with no recourse, which would be very annoying).But we were just hacking with @thmsobrmlr when suddenly we had to wait TWENTY seconds for Python to parse a statement (the actual query took 0.2s). Let's start using the new parser in local dev and we might also uncover some issue (or find that it's perfect).