-
Notifications
You must be signed in to change notification settings - Fork 6k
ImportInto: add import sdk for cloud | tidb-test=b256656b231ebd8f752e8738e89fc64f5263721a #61016
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
ImportInto: add import sdk for cloud | tidb-test=b256656b231ebd8f752e8738e89fc64f5263721a #61016
Conversation
Hi @GMHDBJD. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. Instructions 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. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feature/next-gen-importer #61016 +/- ##
=================================================================
+ Coverage 73.1819% 73.5527% +0.3708%
=================================================================
Files 1724 1727 +3
Lines 477752 484073 +6321
=================================================================
+ Hits 349628 356049 +6421
+ Misses 106707 106471 -236
- Partials 21417 21553 +136
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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.
These comments don't need to be resolved for now, we can change it in PR for master.
pkg/executor/importer/cloud_sdk.go
Outdated
} | ||
|
||
// GetTablesMeta implements the CloudImportSDK interface | ||
func (sdk *ImportSDK) GetTablesMeta(ctx context.Context) ([]*TableMeta, error) { |
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.
Seems like we can store allDataFiles
in ImportSDK
and initialize it in NewImportSDK
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.
actually I think cloud only need GetTablesMeta, no need to call GetableMetaByName, so the allDataFiles will only calculate once
pkg/executor/importer/cloud_sdk.go
Outdated
} | ||
|
||
// Process data files | ||
dataFiles, totalSize, err := sdk.processDataFiles(tblMeta.DataFiles) |
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.
Make processDataFiles
return TableMeta
directly?
mock.ExpectQuery(`SELECT SCHEMA_NAME FROM information_schema.SCHEMATA`). | ||
WillReturnRows(sqlmock.NewRows([]string{"SCHEMA_NAME"}).AddRow("cloud_csv")) | ||
mock.ExpectQuery("SHOW CREATE TABLE `cloud_csv`.`t`"). | ||
WillReturnRows(sqlmock.NewRows([]string{"Create Table"}).AddRow(`create table t (a bigint primary key, b varchar(100), c varchar(100), d int, | ||
key(a), key(c,d), key(d));`)) |
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 we need this
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.
Verify table exist if there is no table schema in source files
/retest |
@GMHDBJD: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
Instructions 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. |
/retest |
@GMHDBJD: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
Instructions 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. |
/retest |
@GMHDBJD: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
Instructions 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. |
/retest |
@GMHDBJD: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
Instructions 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. |
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Benjamin2037, joechenrh The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
66debdc
into
pingcap:feature/next-gen-importer
What problem does this PR solve?
Issue Number: ref #61264
Problem Summary:
What changed and how does it work?
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.