fix: Remove spaces around partition columns#18423
fix: Remove spaces around partition columns#18423linliu-code wants to merge 1 commit intoapache:masterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #18423 +/- ##
============================================
- Coverage 68.26% 68.25% -0.01%
+ Complexity 27761 27754 -7
============================================
Files 2439 2439
Lines 134355 134356 +1
Branches 16210 16210
============================================
- Hits 91715 91710 -5
+ Misses 35543 35542 -1
- Partials 7097 7104 +7
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
yihua
left a comment
There was a problem hiding this comment.
🤖 This review was generated by an AI agent and may contain mistakes. Please verify any suggestions before applying.
LGTM — the fix is simple and correct. Trimming before the empty-string filter is the right order, and the trimmed field names flow cleanly into getPartitionFieldWithoutKeyGenPartitionType. One thing worth noting: a reviewer has already asked for a dedicated test covering the leading/trailing-space scenario (e.g. " C1", "C1 ", "C1, C2"), and the contributor's checklist item for tests is still unchecked — it'd be good to add one before merging.
Describe the issue this Pull Request addresses
Partition columns can be around by spaces during configuration, like
\sC1,C1\s, orC1,\sC2. In those cases, NPE could be thrown since we cannot find any partition columns when spaces.Summary and Changelog
Remove spaces around partition columns during parsing.
Impact
Avoid NPE.
Risk Level
None.
Documentation Update
Contributor's checklist