gh-ost
gh-ost copied to clipboard
Proposal for New Ghost Feature Integration issue: #1514
A Pull Request should be associated with an Issue.
Related issue: https://github.com/github/gh-ost/issues/1514
Further notes in https://github.com/github/gh-ost/blob/master/.github/CONTRIBUTING.md Thank you! We are open to PRs, but please understand if for technical reasons we are unable to accept each and any PR
Description
This PR :
I have added a new PR for this feature, and the code is currently running in our production environment and testing.
The PR includes: A new WHERE clause statement, defaulting to 1=1. Here’s an example of filter operations:
Comparison operators: “<, >, =, !=”
- data_created > year('2020')
- id >= 100
- status IN ('done') # Please use a maximum of 5 values for IN; otherwise, use a temp table.
Sub-select from a temp table:
- id IN (SELECT id FROM temp_id) - Preferred for primary keys; otherwise, it’s a heavy process.
- varchar_column IN (SELECT varchar_column FROM varchar_temp_table)
Adding the receiving condition to the SQL builder mechanism that filters in the data according to our additional statement in the WHERE clause.