feat: implement CONCAT_WS function for E6 dialect#137
Merged
ranjanankur314 merged 4 commits intoe6data:mainfrom Aug 5, 2025
Merged
feat: implement CONCAT_WS function for E6 dialect#137ranjanankur314 merged 4 commits intoe6data:mainfrom
ranjanankur314 merged 4 commits intoe6data:mainfrom
Conversation
The merge-base changed after approval.
The merge-base changed after approval.
ranjanankur314
previously approved these changes
Aug 4, 2025
The merge-base changed after approval.
shreyas2201
previously approved these changes
Aug 4, 2025
ranjanankur314
previously approved these changes
Aug 4, 2025
aravindh-e6x
previously approved these changes
Aug 4, 2025
The merge-base changed after approval.
Author
|
Hi @aravindh-e6x , @ranjanankur314 ,@gauravdawar-e6 |
added 4 commits
August 4, 2025 20:37
…ONCAT_WS
- Replace hardcoded 'ARRAY' string with proper exp.Array expression node
- Use self.func('ARRAY_TO_STRING', ...) directly to avoid ARRAY_JOIN mapping
- Maintain all Databricks CONCAT_WS behaviors (NULL filtering, array flattening)
94e77a3 to
ff40886
Compare
Author
|
@ranjanankur314 @gauravdawar-e6 @aravindh-e6x |
ranjanankur314
approved these changes
Aug 5, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
• Implemented CONCAT_WS function for E6 dialect with full Databricks compatibility
• Added comprehensive test coverage for all documented behaviors
Implementation Details
• NULL handling: NULL separator returns NULL, NULL arguments are filtered out
• Array support: Arrays are flattened and NULL elements within arrays are removed
• Edge cases: Returns empty string when only separator provided or all args are NULL
• Performance: Uses efficient AST manipulation instead of complex CASE statements
Test Coverage
Added tests covering all Databricks examples:
•
concat_ws(' ', 'Spark', 'SQL')→'Spark SQL'•
concat_ws('s')→''•
concat_ws(',', 'Spark', array('S', 'Q', NULL, 'L'), NULL)→'Spark,S,Q,L'• Multiple additional edge cases
Test Results
✅ All 857 tests pass - no regressions introduced