-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
expression: fix panic while call Column.VecEvalInt
#13401
Conversation
Signed-off-by: Lonng <heng@lonng.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Lonng <heng@lonng.org>
expression/column_test.go
Outdated
@@ -172,7 +172,7 @@ func (s *testEvaluatorSuite) TestColHybird(c *C) { | |||
c.Assert(err, IsNil) | |||
input.AppendBytes(0, num) | |||
} | |||
result, err := newBuffer(types.ETInt, 1024) | |||
result, err := newBuffer(types.ETString, 1024) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add an annotation to explain why use VecEvalInt
but type is ETString
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should keep this regular test and add a new specific case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The case can be triggered if the result chunk.Chunk
has a different field type with Int
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get it, but it is not intuitive for the first-time code reader.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments addressed
Codecov Report
@@ Coverage Diff @@
## master #13401 +/- ##
===========================================
Coverage 80.2116% 80.2116%
===========================================
Files 471 471
Lines 113324 113324
===========================================
Hits 90899 90899
Misses 15369 15369
Partials 7056 7056 |
Signed-off-by: Lonng <heng@lonng.org>
/run-integration-copr-test copr-test=pr/22 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/merge |
/run-all-tests |
@lonng merge failed. |
/run-integration-ddl-test |
Signed-off-by: Lonng <heng@lonng.org>
Signed-off-by: Lonng heng@lonng.org
What problem does this PR solve?
expression: fix panic while call
Column.VecEvalInt
What is changed and how it works?
The
Column.VecEvalInt
treats thechunk.Chunk
as anint64
container, but the originalchunk.Chunk
may have a different field type.Check List
Tests
Release note.