-
Notifications
You must be signed in to change notification settings - Fork 591
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
feat(batch): support mysql_query
for mysql batch ingestion
#19071
Merged
+1,050
−113
Merged
Changes from all commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
250c4aa
add mysql_query
kwannoel 82935fd
fmt
kwannoel 12ce8f0
use mysql_async in binder
kwannoel 63202d9
add mysql table type
kwannoel db4062b
bind types
kwannoel a8d3efc
add optimizer rule
kwannoel 8f6e323
minor
kwannoel 546370e
add error context
kwannoel 8258dff
add mysql plan nodes + batch executor skeleton
kwannoel 2486af4
link rule to logical plan node
kwannoel 23cd0ee
instantiate connection in mysql executor
kwannoel c3715b6
handle MySql serde
kwannoel 8c68e2f
introduce macro
kwannoel ee9f146
convert all mysql types to rw types
kwannoel f5925d5
add e2e mysql_query slt test
kwannoel fb18cac
fix warn
kwannoel 86d8d45
rename db
kwannoel e1002df
missing comma?
kwannoel 07aa7a6
add varchar len
kwannoel 90085a8
fix
kwannoel 522ad34
fix
kwannoel b50c38c
fix
kwannoel 406f3b0
fix
kwannoel 03bf907
add TableFunctionToMySqlQueryRule
kwannoel e420c8c
fix
kwannoel d3923af
handle more types
kwannoel 90958d5
try again
kwannoel ea78a3d
add more context to error
kwannoel 2e4c15c
refine
kwannoel e909dd4
try fix
kwannoel 30908a0
fix test
kwannoel 2606251
explicitly bind unsupported types
kwannoel 20b224f
support more types
kwannoel adcf79b
extract common logic
kwannoel 90f7d71
reuse common parsing logic
kwannoel 48503b0
add risedev profile for local inline tests
kwannoel 38d447c
make handling of tinyint straightforward
kwannoel f3ec0ff
handle more types
kwannoel 02d983d
test all types
kwannoel e7d6070
test jsonb
kwannoel 5f31f3d
add chrono feature
kwannoel bbbca68
test null
kwannoel 5b54d1b
cleanup docs
kwannoel db7d3bd
fix source test
kwannoel aff5786
use chunk_size instead of magic value
kwannoel 0aa4fba
safely parse port
kwannoel f389b4d
fix typo + handling parse error
kwannoel e84ce45
move conversion to connector
kwannoel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
control substitution on | ||
|
||
system ok | ||
mysql -e "DROP DATABASE IF EXISTS tvf; CREATE DATABASE tvf;" | ||
|
||
system ok | ||
mysql -e " | ||
USE tvf; | ||
CREATE TABLE test ( | ||
id bigint primary key, | ||
v0 bit, | ||
v1 bool, | ||
v2 tinyint(1), | ||
v3 tinyint(2), | ||
v4 smallint, | ||
v5 mediumint, | ||
v6 integer, | ||
v7 bigint, | ||
v8 float, | ||
v9 double, | ||
v10 numeric(4, 2), | ||
v11 decimal(4, 2), | ||
v12 char(255), | ||
v13 varchar(255), | ||
v14 bit(10), | ||
v15 tinyblob, | ||
v16 blob, | ||
v17 mediumblob, | ||
v18 longblob, | ||
v19 date, | ||
v20 time, | ||
v21 timestamp, | ||
v22 json, | ||
v23 int | ||
); | ||
INSERT INTO test SELECT | ||
1 as id, | ||
true as v0, | ||
true as v1, | ||
2 as v2, | ||
3 as v3, | ||
4 as v4, | ||
5 as v5, | ||
6 as v6, | ||
7 as v7, | ||
1.08 as v8, | ||
1.09 as v9, | ||
1.10 as v10, | ||
1.11 as v11, | ||
'char' as v12, | ||
'varchar' as v13, | ||
b'1010' as v14, | ||
x'16' as v15, | ||
x'17' as v16, | ||
x'18' as v17, | ||
x'19' as v18, | ||
'2021-01-01' as v19, | ||
'12:34:56' as v20, | ||
'2021-01-01 12:34:56' as v21, | ||
JSON_OBJECT('key1', 1, 'key2', 'abc') as v22, | ||
null as v23; | ||
" | ||
|
||
query | ||
select * from mysql_query('$MYSQL_HOST', '$MYSQL_TCP_PORT', '$RISEDEV_MYSQL_USER', '$MYSQL_PWD', 'tvf', 'select * from test;'); | ||
---- | ||
1 t 1 2 3 4 5 6 7 1.08 1.09 1.10 1.11 char varchar \x000a \x16 \x17 \x18 \x19 2021-01-01 12:34:56 2021-01-01 12:34:56+00:00 {"key1": 1, "key2": "abc"} NULL | ||
|
||
system ok | ||
mysql -e " | ||
USE tvf; | ||
DROP DATABASE tvf; | ||
" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
why is this changed? Could you please note the "changes" of the "Type mapping table" in the release note?
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.
Updated the release notes, previously only mentioned them in the PR description. It's because we support
bit
conversion now.