You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "jinchengchenghh (via GitHub)" <gi...@apache.org> on 2023/05/06 08:01:53 UTC

[GitHub] [arrow] jinchengchenghh opened a new pull request, #35462: GH-35461: [C++] Add function Seek to BufferOutputStream

jinchengchenghh opened a new pull request, #35462:
URL: https://github.com/apache/arrow/pull/35462

   (no 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


[GitHub] [arrow] github-actions[bot] commented on pull request #35462: GH-35461: [C++] Add function Seek to BufferOutputStream

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #35462:
URL: https://github.com/apache/arrow/pull/35462#issuecomment-1537084200

   :warning: GitHub issue #35461 **has been automatically assigned in GitHub** to PR creator.


-- 
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


[GitHub] [arrow] wgtmac commented on a diff in pull request #35462: GH-35461: [C++] Add function Seek to BufferOutputStream

Posted by "wgtmac (via GitHub)" <gi...@apache.org>.
wgtmac commented on code in PR #35462:
URL: https://github.com/apache/arrow/pull/35462#discussion_r1187534783


##########
cpp/src/arrow/io/memory.cc:
##########
@@ -110,6 +110,21 @@ Status BufferOutputStream::Write(const void* data, int64_t nbytes) {
   return Status::OK();
 }
 
+Status BufferOutputStream::Seek(int64_t position) {

Review Comment:
   Before discussing the name, could you please justify the use case? 
   
   Also cc @wjones127 



-- 
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


[GitHub] [arrow] jinchengchenghh closed pull request #35462: GH-35461: [C++] Add function Seek to BufferOutputStream

Posted by "jinchengchenghh (via GitHub)" <gi...@apache.org>.
jinchengchenghh closed pull request #35462: GH-35461: [C++] Add function Seek to BufferOutputStream
URL: https://github.com/apache/arrow/pull/35462


-- 
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


[GitHub] [arrow] jinchengchenghh commented on a diff in pull request #35462: GH-35461: [C++] Add function Seek to BufferOutputStream

Posted by "jinchengchenghh (via GitHub)" <gi...@apache.org>.
jinchengchenghh commented on code in PR #35462:
URL: https://github.com/apache/arrow/pull/35462#discussion_r1187051412


##########
cpp/src/arrow/io/memory.cc:
##########
@@ -110,6 +110,21 @@ Status BufferOutputStream::Write(const void* data, int64_t nbytes) {
   return Status::OK();
 }
 
+Status BufferOutputStream::Seek(int64_t position) {

Review Comment:
   Do you have recommended class name for seekable output stream?



-- 
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


[GitHub] [arrow] github-actions[bot] commented on pull request #35462: GH-35461: [C++] Add function Seek to BufferOutputStream

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #35462:
URL: https://github.com/apache/arrow/pull/35462#issuecomment-1537084190

   * Closes: #35461


-- 
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


[GitHub] [arrow] wgtmac commented on a diff in pull request #35462: GH-35461: [C++] Add function Seek to BufferOutputStream

Posted by "wgtmac (via GitHub)" <gi...@apache.org>.
wgtmac commented on code in PR #35462:
URL: https://github.com/apache/arrow/pull/35462#discussion_r1186959238


##########
cpp/src/arrow/io/memory.cc:
##########
@@ -110,6 +110,21 @@ Status BufferOutputStream::Write(const void* data, int64_t nbytes) {
   return Status::OK();
 }
 
+Status BufferOutputStream::Seek(int64_t position) {

Review Comment:
   I'd prefer creating a separate class for the seekable output stream as its semantics is append-only and downstream applications are using it with that assumption.



-- 
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


[GitHub] [arrow] westonpace commented on a diff in pull request #35462: GH-35461: [C++] Add function Seek to BufferOutputStream

Posted by "westonpace (via GitHub)" <gi...@apache.org>.
westonpace commented on code in PR #35462:
URL: https://github.com/apache/arrow/pull/35462#discussion_r1187864941


##########
cpp/src/arrow/io/memory.cc:
##########
@@ -110,6 +110,21 @@ Status BufferOutputStream::Write(const void* data, int64_t nbytes) {
   return Status::OK();
 }
 
+Status BufferOutputStream::Seek(int64_t position) {

Review Comment:
   On the read side we have:
   
   InputStream - non-seekable input
   ReadableFile - seekable input
   
   So I think we should use `WriteableFile` and not `OutputStream`.  Also note that some filesystems do not support seekable output (e.g. S3).



-- 
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


[GitHub] [arrow] jinchengchenghh commented on a diff in pull request #35462: GH-35461: [C++] Add function Seek to BufferOutputStream

Posted by "jinchengchenghh (via GitHub)" <gi...@apache.org>.
jinchengchenghh commented on code in PR #35462:
URL: https://github.com/apache/arrow/pull/35462#discussion_r1210988384


##########
cpp/src/arrow/io/memory.cc:
##########
@@ -110,6 +110,21 @@ Status BufferOutputStream::Write(const void* data, int64_t nbytes) {
   return Status::OK();
 }
 
+Status BufferOutputStream::Seek(int64_t position) {

Review Comment:
   I optimize my code to use `FixedSizeBufferWriter`, so I don't need this feature now, thanks for your kindly review!



-- 
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