-
Notifications
You must be signed in to change notification settings - Fork 310
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix parsing columns when --do-create-db=false
This fixes a bug where the PostCreateDB function would exit early when the user set --do-create-db=false and/or --create-metrics-table=False. This early exit caused TSBS to skip the updating of some global caches, which broke assumptions in other parts of the codebase. This commit also refactors the PostCreateDB function to split the parsing of columns and the potential creation of tables and indexes into separate functions. This makes it easier to test the functions in isolation and cleaner to create the conditional create-table logic that is at the heart of this bug. While this does add tests to the parsing function, the create tables/index function remains untested. This is left for a later PR that will hopefully clean up global state and provide a more comprehensive framework for testing IO.
- Loading branch information
1 parent
addc791
commit 19932e7
Showing
2 changed files
with
170 additions
and
70 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