*: fix fix pushdown cast to datetime from float for tikv#67907
*: fix fix pushdown cast to datetime from float for tikv#67907xhebox wants to merge 1 commit intopingcap:masterfrom
Conversation
|
@xhebox I've received your pull request and will start the review. I'll conduct a thorough review covering code quality, potential issues, and implementation details. ⏳ This process typically takes 10-30 minutes depending on the complexity of the changes. ℹ️ Learn more details on Pantheon AI. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @xhebox. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/ok-to-test |
📝 WalkthroughWalkthroughThis pull request adds two test cases to verify consistent behavior when applying Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.11.4)Command failed 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 |
|
/retest |
Signed-off-by: xhe <xw897002528@gmail.com>
c2dc909 to
1dfe124
Compare
|
@xhebox: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@pkg/executor/test/simpletest/simple_test.go`:
- Around line 834-845: The test currently only asserts rows1 and rows2 have
equal lengths which can miss the failure mode where both are empty; update the
assertion to pin the expected result count (e.g., expect 1 row) for both result1
and result2 by checking len(rows1) == 1 and len(rows2) == 1 (or assert both
equal to the known expected count) after executing tk.MustQuery on the
generated-column table (result1) and base-column table (result2); reference the
variables result1, result2, rows1, rows2 and the tk.MustQuery/tk.MustExec setup
so the test fails when both cases return zero rows.
In `@tests/realtikvtest/pushdowntest/cast_test.go`:
- Around line 17-23: Update the test in
tests/realtikvtest/pushdowntest/cast_test.go to assert concrete row counts for
both query variants instead of allowing zero-row equivalence: use testkit to run
the two CAST(float AS DATETIME) queries and require.Equal the expected counts
(explicit integers) for each case; additionally run EXPLAIN for the query that
should push the predicate and assert the plan string contains the coprocessor
predicate (e.g., check EXPLAIN output includes the pushed predicate text or
"cop[t]rocessor" filter fragment) to ensure the predicate was pushed to TiKV;
use the existing test utilities (testkit and require) and adjust both related
test locations (the current block and the block around lines 37-48) accordingly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 192a7fd2-9fc6-4b2c-904e-56bf2fe62ce2
📒 Files selected for processing (2)
pkg/executor/test/simpletest/simple_test.gotests/realtikvtest/pushdowntest/cast_test.go
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #67907 +/- ##
================================================
- Coverage 77.7154% 77.5404% -0.1750%
================================================
Files 2016 1966 -50
Lines 552643 568218 +15575
================================================
+ Hits 429489 440599 +11110
- Misses 121412 127537 +6125
+ Partials 1742 82 -1660
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
@xhebox: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
What problem does this PR solve?
Issue Number: close #44135
Problem Summary: add regression test
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.
Summary by CodeRabbit