Skip to content

Conversation

@aaron-steinfeld
Copy link
Contributor

Description

This new operator, CONCAT_OR_NULL adds a variant of concat behavior where concat'ing null with another value returns null. Our current CONCAT operator returns the value in this case (would rather flip this behavior and have the null propagate by default, but that's breaking). Similar behavior variants are present in SQL databases such as https://docs.microsoft.com/en-us/sql/t-sql/statements/set-concat-null-yields-null-transact-sql?view=sql-server-ver15#:~:text=When%20SET%20CONCAT_NULL_YIELDS_NULL%20is%20ON,treated%20as%20an%20empty%20string).

Testing

Added UT, verified E2E

Checklist:

  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • Any dependent changes have been merged and published in downstream modules

@aaron-steinfeld aaron-steinfeld requested a review from a team April 19, 2021 23:52
@codecov
Copy link

codecov bot commented Apr 19, 2021

Codecov Report

Merging #93 (547bb82) into main (aceb6fd) will increase coverage by 0.04%.
The diff coverage is 85.71%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main      #93      +/-   ##
============================================
+ Coverage     80.71%   80.76%   +0.04%     
- Complexity      222      225       +3     
============================================
  Files            27       28       +1     
  Lines           752      759       +7     
  Branches         56       56              
============================================
+ Hits            607      613       +6     
- Misses           98       99       +1     
  Partials         47       47              
Flag Coverage Δ Complexity Δ
integration 80.76% <85.71%> (+0.04%) 147.00 <3.00> (+3.00)
unit 67.95% <85.71%> (+0.17%) 206.00 <3.00> (+3.00)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ Complexity Δ
...ervice/projection/functions/ConcatenateOrNull.java 75.00% <75.00%> (ø) 3.00 <3.00> (?)
...ervice/projection/AttributeProjectionRegistry.java 100.00% <100.00%> (ø) 3.00 <0.00> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aceb6fd...547bb82. Read the comment docs.

@github-actions

This comment has been minimized.

@aaron-steinfeld aaron-steinfeld merged commit bc6b0f3 into main Apr 20, 2021
@aaron-steinfeld aaron-steinfeld deleted the concat-or-null branch April 20, 2021 00:06
@github-actions
Copy link
Contributor

Unit Test Results

21 files  +1  21 suites  +1   11s ⏱️ ±0s
77 tests +2  77 ✔️ +2  0 💤 ±0  0 ❌ ±0 

Results for commit bc6b0f3. ± Comparison against base commit aceb6fd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants