-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
importccl: pre-read schemas in mysqldump import
This switches mysqldump import to use read schemas from during setup on the gateway, rather than during sampling, similar to how pgdump operates (i.e. in three passes over the input rather than two). This simplifies handling foreign keys, which can sometimes appear in a table definition before the table they reference — making them hard to correctly resolve immediately. Reading though the whole file to capture all the schemas before evaluating them should make that a bit easier. In the future, a return to 2-pass could be possible either if it turns out that KVs can be produced correctly even if the schema is later changed by a foreign key, or by oversampling raw rows of the input *without* converting during the read extracting the schemas, then using those schemas to convert the sampled rows to KVs from which the splits can be sampled. Release note: none.
- Loading branch information
Showing
3 changed files
with
69 additions
and
113 deletions.
There are no files selected for viewing
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
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
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