You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "jacobmarble (via GitHub)" <gi...@apache.org> on 2023/01/26 00:30:05 UTC

[GitHub] [arrow-adbc] jacobmarble opened a new issue, #391: [Go][sqldriver] cannot use `arrow.Timestamp` without more information

jacobmarble opened a new issue, #391:
URL: https://github.com/apache/arrow-adbc/issues/391

   In order to properly consume a query result value with type `arrow.Timestamp`, `arrow.Time32`, or `arrow.Time64`, the `arrow.UnitType` must be known. The convenience method for these types is `ToTime(unit TimeUnit) time.Time`.
   
   However, `sqldriver` doesn't make the unit type available via the `database/sql` interfaces.
   
   Some options:
   ## `rows.Next(dest []driver.Value)` converts all five date/time types to `time.Time` implicitly
   
   Converting all date/time values to `time.Time` is my own preference, but uncertain that this won't break use cases. `arrow.Duration` and friends will have a similar question, eventually. Generally, does ADBC/Golang want to expose idiomatic types, or provide native Arrow types?
   
   ## indicate unit in the string value returned by one or more of interfaces
   - `database/sql/driver.RowsColumnTypeDatabaseTypeName`
   - `database/sql/driver.RowsColumnTypeLength`
   
   This seems like the most conservative approach for now, so I'll put a PR together.


-- 
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: issues-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-adbc] zeroshade closed issue #391: [Go][sqldriver] cannot use `arrow.Timestamp` without more information

Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade closed issue #391: [Go][sqldriver] cannot use `arrow.Timestamp` without more information
URL: https://github.com/apache/arrow-adbc/issues/391


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


[GitHub] [arrow-adbc] jacobmarble commented on issue #391: [Go][sqldriver] cannot use `arrow.Timestamp` without more information

Posted by "jacobmarble (via GitHub)" <gi...@apache.org>.
jacobmarble commented on issue #391:
URL: https://github.com/apache/arrow-adbc/issues/391#issuecomment-1405348464

   Cool. I'll work on tests for #392 and #393


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


[GitHub] [arrow-adbc] lidavidm commented on issue #391: [Go][sqldriver] cannot use `arrow.Timestamp` without more information

Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #391:
URL: https://github.com/apache/arrow-adbc/issues/391#issuecomment-1404958340

   CC @zeroshade 
   
   I'd say we should expose idiomatic Go types, or in general act like other Go drivers, in which case we should convert to time.Time here.


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


[GitHub] [arrow-adbc] zeroshade commented on issue #391: [Go][sqldriver] cannot use `arrow.Timestamp` without more information

Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade commented on issue #391:
URL: https://github.com/apache/arrow-adbc/issues/391#issuecomment-1405224424

   I agree, i think we should expose idiomatic Go types from the database/sql adapter.


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