Skip to content
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

Restored outputDefaultSchema and outputDefaultCatalog command arguments #2834

Merged
merged 1 commit into from
Jun 1, 2022

Conversation

nvoxland
Copy link
Contributor

@nvoxland nvoxland commented May 9, 2022

Description

With the command framework refactoring in 4.4.0, the outputDefaultSchema and outputDefaultCatalog arguments were missed. Because of that, there is no way to change the behavior away from the default value (true).

The flag is re-added as a command-level argument, since it only really applies to *Sql commands and is therefore not a global argument.

  • If true, any generated SQL will have objects in the default schema fully qualified with the default schema and/or default catalog as possible.
  • If false, any generated SQL will have objects in the default schema and/or default catalog left unqualified. Objects in non-default schema/catalog are always fully qualified.

This change ensures the flag is exposed and passed along, but does not attempt to change or test the behavior as it was in 4.3 and before.

Additional Context

Fixes #2547

Things to be aware of

  • The existing command test setup lets us catch the commands which had the flags added and if they get lost again down the road. But we don't have a good automated test option for ensuring they are correctly respected and so need to be manually checked for now.

Things to worry about

  • Nothing

@nvoxland nvoxland changed the title Restored outputSchemaName and outputCatalogName command arguments Restored outputDefaultSchema and outputDefaultCatalog command arguments May 9, 2022
@nvoxland nvoxland requested a review from suryaaki2 May 9, 2022 19:39
@github-actions
Copy link

github-actions bot commented May 9, 2022

Unit Test Results

  4 512 files  ±0    4 512 suites  ±0   36m 0s ⏱️ - 6m 32s
  4 389 tests ±0    4 171 ✔️  - 4     218 💤 +4  0 ±0 
51 948 runs  ±0  46 936 ✔️  - 4  5 012 💤 +4  0 ±0 

Results for commit 1f7207d. ± Comparison against base commit 3728b75.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@StevenMassaro StevenMassaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice if there were some way to reduce this code duplication.

@kataggart kataggart added this to To Do in Conditioning++ via automation May 10, 2022
@nvoxland
Copy link
Contributor Author

Yeah, it would be. My plan is to take advantage of the "command step pipeline" to have re-usable steps to plug in settings like this from a common spot. But that will take some refactoring we weren't quite ready for yet.

@ecarneiro01
Copy link

I confirmed that the flags were being applied and made changes in the SQL scripts generated by the update and rollback commands.

  • Check flag outputDefaultSchema is being passed to the commands executed. PASS
  • Check flag outputDefaultCatalog is being passed to the commands executed (To notice changes here the flag includeCatalogInSpecification must also be set to true). PASS

This was checked in MSSQLServer 2017 14.0.3436.1 (x64).

@nvoxland nvoxland merged commit 89cab95 into master Jun 1, 2022
Conditioning++ automation moved this from To Do to Done Jun 1, 2022
@nvoxland nvoxland deleted the fix-output-defaut-schema branch June 1, 2022 18:29
@kataggart kataggart added this to the NEXT milestone Jun 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
5 participants