DBT-774: Modify the macro for TestRight to return empty string('') instead of NULL #143
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.
Describe your changes
For TestRight, the current sql is mentioned below, however with this sql, in the case when length_epression = 0, we are getting NULL in actual column whereas in expected column of test_right we are getting an empty string, which is causing a mismatch between the expected and actual values.
This PR suggests to update the macro so that instead of NULL we get an empty string in the actual column.
Internal Jira ticket number or external issue link
https://jira.cloudera.com/browse/DBT-774
Testing procedure/screenshots(if appropriate):
TestRight in v1.5 - https://gist.github.com/nsharma-25/00c62edbf737b25dae0dffca6ad9dbd5
TestRight in v1.6 - https://gist.github.com/nsharma-25/1e2b07fdf55c49bb69f82a8dcae7a3d9
All Tests in v1.5- https://gist.github.com/nsharma-25/a7368721576fb58593d4163218c5ae4e
All Tests in v1.6 - https://gist.github.com/nsharma-25/7846b543427a12517e6b2674f12feadc
Checklist before requesting a review