-
Notifications
You must be signed in to change notification settings - Fork 288
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
sink: support maxwell data format #869
Conversation
…nto feture_maxwell
…nto feture_maxwell
…nto feture_maxwell
…nto feture_maxwell
/run-all-tests |
io "io" | ||
math "math" | ||
math_bits "math/bits" | ||
|
||
proto "github.com/golang/protobuf/proto" |
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.
recover this file?
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.
sorry ,I don't know what's you mean,this pr has nothing to do with proto package.
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 mean, undo the changes to this file.
cdc/sink/codec/maxwell.go
Outdated
Ts: e.CommitTs, | ||
Database: e.Table.Schema, | ||
Table: e.Table.Table, | ||
Type: "update", |
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.
Type: "update", |
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.
done
cdc/sink/codec/maxwell.go
Outdated
return "table-alter" | ||
} | ||
switch ddlType { | ||
case 3: |
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.
Is it better to use constant variable from parser lib instead of the const number, such as model2.ActionCreateTable
?
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.
done
cdc/sink/codec/maxwell.go
Outdated
func columnToMaxwellType(columnType byte) (string, error) { | ||
switch columnType { | ||
// tinyint,smallint,mediumint,int | ||
case 1, 2, 3, 9: |
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.
ditto, is it better to use mysql.TypeTiny
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.
done
/run-all-tests |
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
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 |
Codecov Report
@@ Coverage Diff @@
## master #869 +/- ##
===========================================
Coverage 33.2192% 33.2192%
===========================================
Files 99 99
Lines 11683 11683
===========================================
Hits 3881 3881
Misses 7416 7416
Partials 386 386 |
What problem does this PR solve?
What is changed and how it works?
Check List
Tests
Code changes
Side effects
Related changes
tidb-cdc
Release note