-
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
Add CSV file import function #27149
Add CSV file import function #27149
Conversation
@KumaJie E2e jenkins job failed, comment |
b699a71
to
dcbf29a
Compare
@KumaJie E2e jenkins job failed, comment |
@KumaJie I tried your code. One problem I found: CSV file start with a Some discussion about BOM: https://stackoverflow.com/questions/21371673/reading-files-with-a-bom-in-go |
Thanks for your feedback and I will fix that. Your suggestion is very helpful😊. // csv parser
reader := bufio.NewReader(file)
// discard bom in the file
r, _, err := reader.ReadRune()
if err != nil {
return err
}
if r != '\ufeff' {
reader.UnreadRune()
}
// .... |
rerun the ut |
@KumaJie ut workflow job failed, comment |
Codecov Report
@@ Coverage Diff @@
## master #27149 +/- ##
==========================================
+ Coverage 81.74% 81.78% +0.03%
==========================================
Files 821 823 +2
Lines 116328 116911 +583
==========================================
+ Hits 95098 95614 +516
- Misses 18071 18116 +45
- Partials 3159 3181 +22
|
oldPercent := int64(0) | ||
updateProgress := func() { | ||
if p.updateProgressFunc != nil && reader.fileSize > 0 { | ||
percent := (r.InputOffset() * ProgressValueForPersist) / reader.fileSize |
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.
csv InputOffset()
is only supported after go 1.19. This will break milvus's go >=1.18 dependency restrictions. @xiaofan-luan Is that OK or we have to work around it?
@KumaJie Generally LGTM. I prefer to put BOM handle logic into CSVParser. Could you please adjust it and fix code checks in https://github.com/milvus-io/milvus/actions/runs/6298875222/job/17382624374?pr=27149? |
Signed-off-by: kuma <[email protected]>
rerun the ut |
rerun ut |
Hello KumaJie, you are not in the organization, so you do not have the permission to rerun the workflow, please contact |
rerun it |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: czs007, KumaJie 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 |
issue: #27148 from pr: #27149 Signed-off-by: kuma <[email protected]> Co-authored-by: kuma <[email protected]>
#27148