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

[GitHub] [arrow-adbc] lidavidm commented on a diff in pull request #707: feat(c/driver/postgresql): handle non-SELECT statements

lidavidm commented on code in PR #707:
URL: https://github.com/apache/arrow-adbc/pull/707#discussion_r1204803781


##########
c/driver/postgresql/statement.cc:
##########
@@ -683,6 +693,17 @@ AdbcStatusCode PostgresStatement::ExecuteQuery(struct ArrowArrayStream* stream,
       return na_res;
     }
 
+    // If there are no output columns (e.g. a CREATE or UPDATE), then
+    // don't use COPY (which would fail anyways)
+    if (root_type.n_children() == 0) {
+      RAISE_ADBC(ExecuteUpdateQuery(rows_affected, error));
+      struct ArrowSchema schema;
+      std::memset(&schema, 0, sizeof(schema));

Review Comment:
   Mostly just a bad habit of mine since it's consistent between C/C++; {0} is perfectly fine too



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