You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "lidavidm (via GitHub)" <gi...@apache.org> on 2023/04/21 05:00:23 UTC

[GitHub] [arrow-adbc] lidavidm opened a new issue, #598: c: add 'helpers' header for C++ users

lidavidm opened a new issue, #598:
URL: https://github.com/apache/arrow-adbc/issues/598

   Mostly this should contain RAII utilities like those in the PostgreSQL driver. It would make life much easier for C++ users. We could distribute it as a header alongside the driver manager that can also be copy-pasted.


-- 
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: issues-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-adbc] lidavidm commented on issue #598: c: add 'helpers' header for C++ users

Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #598:
URL: https://github.com/apache/arrow-adbc/issues/598#issuecomment-1517274939

   Oh, and potentially helpers to work with AdbcStatusCode as arrow::Status or similar...


-- 
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-adbc] lidavidm commented on issue #598: c: add 'helpers' header for C++ users

Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #598:
URL: https://github.com/apache/arrow-adbc/issues/598#issuecomment-1517815935

   Yeah, if we had `std::expected` (C++23) we would have a standard library version of arrow::Result, but alas...


-- 
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-adbc] paleolimbot commented on issue #598: c: add 'helpers' header for C++ users

Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot commented on issue #598:
URL: https://github.com/apache/arrow-adbc/issues/598#issuecomment-1517770523

   For nanoarrow the C++ helpers header has been absolutely essential...without it it's very easy to leak memory when mixed with other C++ idioms (mostly just this part https://github.com/apache/arrow-nanoarrow/blob/main/src/nanoarrow/nanoarrow.hpp#L107-L147 ). That implementation was basically trying to replicate the syntax + move-only semantics of `std::unique_ptr<T, Deleter>` while avoiding a heap allocation.
   
   I should almost certainly provide a return value helper, too, because the nanoarrow user code that I've read so far does a lot of ignoring of return values. `NANOARROW_RETURN_NOT_OK()` works pretty well but forces the use of pointer output arguments (e.g., https://github.com/apache/arrow-adbc/blob/main/c/driver/postgresql/postgres_type.h#L252-L254 ).


-- 
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-adbc] lidavidm commented on issue #598: c: add 'helpers' header for C++ users

Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #598:
URL: https://github.com/apache/arrow-adbc/issues/598#issuecomment-1517265388

   One step further might be to provide an object-oriented wrapper around the C APIs, e.g.
   
   ```
   namespace adbc {
   class Connection {
   public:
     StatusOr<Statement> NewStatement();
   };
   }
   ```


-- 
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-adbc] lidavidm commented on issue #598: c: add 'helpers' header for C++ users

Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #598:
URL: https://github.com/apache/arrow-adbc/issues/598#issuecomment-1518419089

   Yeah, we're slowly inching to an `arrowlib` (in analogy to `glib` etc) which I suppose just happens naturally when your standard library is so small


-- 
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-adbc] paleolimbot commented on issue #598: c: add 'helpers' header for C++ users

Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot commented on issue #598:
URL: https://github.com/apache/arrow-adbc/issues/598#issuecomment-1517852336

   By the time C++23 is an acceptable constraint we'll all be using Rust anyway 🙂 


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