You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "joellubi (via GitHub)" <gi...@apache.org> on 2024/07/18 21:36:39 UTC
[PR] fix(go/adbc/driver/snowflake): split files properly after reaching targetSize on ingestion [arrow-adbc]
joellubi opened a new pull request, #2026:
URL: https://github.com/apache/arrow-adbc/pull/2026
Fixes: #1997
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(go/adbc/driver/snowflake): split files properly after reaching targetSize on ingestion [arrow-adbc]
Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade merged PR #2026:
URL: https://github.com/apache/arrow-adbc/pull/2026
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(go/adbc/driver/snowflake): split files properly after reaching targetSize on ingestion [arrow-adbc]
Posted by "joellubi (via GitHub)" <gi...@apache.org>.
joellubi commented on PR #2026:
URL: https://github.com/apache/arrow-adbc/pull/2026#issuecomment-2256864034
> Can you do a rebase please? I believe the version was already bumped to v18 for Arrow
Sure, just rebased and applied your comment.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(go/adbc/driver/snowflake): split files properly after reaching targetSize on ingestion [arrow-adbc]
Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade commented on code in PR #2026:
URL: https://github.com/apache/arrow-adbc/pull/2026#discussion_r1691780278
##########
go/adbc/driver/snowflake/bulk_ingestion.go:
##########
@@ -334,20 +334,31 @@ func writeParquet(
parquetProps *parquet.WriterProperties,
arrowProps pqarrow.ArrowWriterProperties,
) error {
- limitWr := &limitWriter{w: w, limit: targetSize}
- pqWriter, err := pqarrow.NewFileWriter(schema, limitWr, parquetProps, arrowProps)
+ pqWriter, err := pqarrow.NewFileWriter(schema, w, parquetProps, arrowProps)
if err != nil {
return err
}
defer pqWriter.Close()
+ var bytesWritten int64
for rec := range in {
- err = pqWriter.WriteBuffered(rec)
+ if rec.NumRows() == 0 {
+ rec.Release()
+ continue
+ }
+
+ err = pqWriter.Write(rec)
rec.Release()
if err != nil {
return err
}
- if limitWr.LimitExceeded() {
+
+ if targetSize < 0 {
+ continue
+ }
+
+ bytesWritten += pqWriter.RowGroupTotalBytesWritten()
+ if bytesWritten > int64(targetSize) {
Review Comment:
`>=` ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org