-
Notifications
You must be signed in to change notification settings - Fork 3k
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
enhance: Bulkinsert supports null in csv formats #35912
Conversation
Signed-off-by: OxalisCu <[email protected]>
Signed-off-by: OxalisCu <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #35912 +/- ##
==========================================
- Coverage 81.60% 72.61% -9.00%
==========================================
Files 1264 1264
Lines 150692 150789 +97
==========================================
- Hits 122976 109488 -13488
- Misses 22826 36406 +13580
- Partials 4890 4895 +5
|
|
||
func GetCSVNullKey(options Options) (string, error) { | ||
nullKey, err := funcutil.GetAttrByKeyFromRepeatedKV("nullkey", options) | ||
defaultNullKey := "" |
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 no need to set a 'defaultNullKey', because reader only try to parse null when nullable. Can simply just return 'NULL' as the null key.
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.
This function is used to parse the nullkey configured by the user. In addition to the defaultNullKey, the user can configure other nullkeys to increase the flexibility of the export format.
For example, the NULL data exported by pg supports configuration http://www.postgres.cn/docs/13/sql-copy.html.
If it is not necessary, I can directly return "NULL".
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.
This function is used to parse the nullkey configured by the user. In addition to the defaultNullKey, the user can configure other nullkeys to increase the flexibility of the export format.
For example, the NULL data exported by pg supports configuration http://www.postgres.cn/docs/13/sql-copy.html.
If it is not necessary, I can directly return "NULL".
I see. it's ok for me now to follow the pg support configuration.
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: congqixia, OxalisCu 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 |
see details in this issue milvus-io#35911 --------- Signed-off-by: OxalisCu <[email protected]>
see details in this issue #35911