-
Notifications
You must be signed in to change notification settings - Fork 1
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
Merge main into xapiens #11
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add dynamodb table sbeacon-dataportal-user-quota
When adding _projectNames to athena queries, the existing execution parameters are iterated through by calling next(). This fails because the execution_parameters argument is a list. Convert the execution_parameters argument into an iterable before attempting to call next() on it. While we're there, add a friendlier error if we run into more " ? " characters than we have parameters.
Because the add_project_names parsing logic splits by spaces to find semantic words, if the placeholder for an execution parameter "?" is immediately preceded or followed by another nonspace character (not including parentheses, which are stripped), the parser does not recognise the "?". This means that the associated execution parameter is not added in the right place and we end up with excess parameters, and a broken query besides. Surround each use of the "?" character in query building with space characters. Future uses of execution parameters that do not do this should immediately crash under most tests, so these sorts of errors will not fly under the radar.
The full reference of a table (often "database"."tablename") is searched to see if it mentions any of the tables that need to be filtered by _projectName. This is done by simply searching to see if any of the names of the relevant tables are contained with in the reference name. This can cause problems if the name of one table is a substring of another table. For example sbeacon_terms_index will trigger because the table sbeacon_terms needs to be filtered. Change the method of identification so the table is split on '"' and '.' chaacters, and then perform an intersection over the two sets of strings. This could mean that if the database name is also a match of a table every table in the database will trigger the filter. We could make an even more robust identification, but I'm not sure how complicated a reference can become, and we shouldn't be using the same names for databases and tables anyway.
We filter the terms table by the _projectname column, but not currently the terms_index table. If we add the _projectname column to the index we won't need to reference the main table and can perform some SQL pushdown to narrow the join space when joining across multiple entities using the index. Add the _projectname column to the the sbeacon_terms_index table.
Ran Plan for dir: Plan Error Show Output
|
…otebooks of removed users
Warning: The plan for dir: To |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.