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/28 17:14:54 UTC

[GitHub] [arrow-adbc] WillAyd commented on a diff in pull request #861: feat(c/driver/postgresql): Timestamp write support

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


##########
c/validation/adbc_validation_util.cc:
##########
@@ -141,7 +141,16 @@ int MakeSchema(struct ArrowSchema* schema, const std::vector<SchemaField>& field
   CHECK_ERRNO(ArrowSchemaSetTypeStruct(schema, fields.size()));
   size_t i = 0;
   for (const SchemaField& field : fields) {
-    CHECK_ERRNO(ArrowSchemaSetType(schema->children[i], field.type));
+    switch (field.type) {
+      case NANOARROW_TYPE_TIMESTAMP:
+        // TODO: don't hardcode unit here
+        CHECK_ERRNO(ArrowSchemaSetTypeDateTime(schema->children[i], field.type,
+                                               NANOARROW_TIME_UNIT_MICRO,

Review Comment:
   `SchemaFields` are an invention of the `adbc_validation_util` header - is there a reason we use this custom struct instead of an `ArrowSchemaView`? I'm not sure if its worth adding `time_unit` to the former or porting over to the latter in the test suite



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