feat(sql): allow underscore number separator in TICK syntax#6749
feat(sql): allow underscore number separator in TICK syntax#6749bluestreak01 merged 4 commits intomasterfrom
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
[PR Coverage check]😍 pass : 16 / 16 (100.00%) file detail
|
|
@CodeRabbit pls review critically, don't hallucinate and double-check each point |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chainI'll conduct a thorough critical review of this PR. Let me start by examining the actual code changes and test coverage. 🏁 Script executed: Length of output: 10397 Let me examine the 🏁 Script executed: Length of output: 46 🏁 Script executed: Length of output: 3358 🏁 Script executed: Length of output: 1228 🏁 Script executed: Length of output: 1985 🏁 Script executed: Length of output: 1944 🏁 Script executed: Length of output: 1091 🏁 Script executed: Length of output: 2845 🏁 Script executed: Length of output: 1294
✅ Confirmed correct:
❌ Critical issues found:1. Scope creep: Unrelated cosmetic refactoringLines 89-95 in - while (varEnd < hi) {
+ for (; varEnd < hi; varEnd++) {
char c = expression.charAt(varEnd);
if (c == ' ' || c == '+' || c == '-') {
break;
}
- varEnd++;
}This while→for conversion is purely cosmetic and unrelated to underscore support. It's not mentioned in the PR description and doesn't add value. The second while→for conversion (lines 125-132) IS justified since it's part of number parsing with underscores, but this first one is not. Question: Why is this change included? It adds unnecessary noise to the diff. 2. Inconsistent underscore support across parsing contextsYou added underscore support to:
But NOT to:
The bracket expansion still uses Questions:
3. Edge case: What about negative numbers with underscores?The PR doesn't test expressions like 4. Minor: CLAUDE.md change seems unrelatedThe change to 🤔 Design questions:
📊 Verdict:The core underscore support is correctly implemented and well-tested. However:
The implementation correctly delegates validation to 🧠 Learnings used |
Summary
$now-10_000T) and duration suffixes (e.g.,;1_500T), consistent withNumbers.parseInt()which already supports thisDateExpressionEvaluatorandIntervalUtils.expandDateVariableRangeto point at the specific offending location instead of the start of the expressionCloses #6736
Test plan
🤖 Generated with Claude Code