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/06/13 21:45:54 UTC

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

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


##########
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:
   Fair. 
   
   SQLite doesn't name its constraints so I wanted some way to just get any constraint.



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