You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "paleolimbot (via GitHub)" <gi...@apache.org> on 2023/02/16 17:50:11 UTC

[GitHub] [arrow-adbc] paleolimbot commented on a diff in pull request #463: feat(r/adbcsqlite): Package SQLite driver for R

paleolimbot commented on code in PR #463:
URL: https://github.com/apache/arrow-adbc/pull/463#discussion_r1108821513


##########
c/driver/sqlite/utils.c:
##########
@@ -134,7 +134,7 @@ void StringBuilderAppend(struct StringBuilder* builder, const char* value) {
     builder->buffer = realloc(builder->buffer, new_capacity);
     builder->capacity = new_capacity;
   }
-  strncpy(builder->buffer + builder->size, value, length);
+  memcpy(builder->buffer + builder->size, value, length);

Review Comment:
   This one is to fix a check warning:
   
   ```
   * checking whether package 'adbcsqlite' can be installed ... [54s] WARNING
   Found the following significant warnings:
     utils.c:137:3: warning: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
   ```



##########
dev/release/rat_exclude_files.txt:
##########
@@ -15,5 +15,10 @@ rat.txt
 r/adbcdrivermanager/DESCRIPTION
 r/adbcdrivermanager/NAMESPACE
 r/adbcdrivermanager/.Rbuildignore
+r/adbcsqlite/DESCRIPTION
+r/adbcsqlite/NAMESPACE
+r/adbcsqlite/.Rbuildignore
+r/adbcsqlite/tools/sqlite3.h
+r/adbcsqlite/tools/sqlite3.c

Review Comment:
   I'm unsure of my method for making the install work out-of-the-box on Windows. To avoid violating the CRAN rule "you can't download sources or binaries" it has to be in the source tarball, and to avoid the CRAN rule "you must link to system dependencies where possible" it can't be vendored all the time (plus the sqlite sources break a few other CRAN rules like "don't use `random` or `stdout` or `stderr`).
   
   RSQLite's approach seems a bit simpler: https://github.com/r-dbi/RSQLite/blob/main/src/Makevars



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