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

[GitHub] [arrow-adbc] WillAyd commented on a diff in pull request #777: fix(c/driver/sqlite): support PRIMARY KEY constraint in GetObjects

WillAyd commented on code in PR #777:
URL: https://github.com/apache/arrow-adbc/pull/777#discussion_r1228715340


##########
c/driver/common/utils.c:
##########
@@ -884,7 +884,7 @@ struct AdbcGetObjectsConstraint* AdbcGetObjectsDataGetConstraintByName(
     for (int64_t i = 0; i < table->n_table_constraints; i++) {
       struct AdbcGetObjectsConstraint* constraint = table->table_constraints[i];
       struct ArrowStringView name = constraint->constraint_name;
-      if (!strncmp(name.data, constraint_name, name.size_bytes)) {
+      if (!constraint_name || !strncmp(name.data, constraint_name, name.size_bytes)) {

Review Comment:
   Hmm is this function receiving a nullptr? Seems a bit strange to call a `GetByName` function, pass it a NULL pointer for the name and expect a result back



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