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

[GitHub] [arrow-adbc] Prussian1870 opened a new issue, #834: python/adbc_driver_sqlite: adbc_ingest creates table without defining the datatypes

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

   When a SQLite table is created from an arrow table the table is created but the data types are not defined:
   
   import adbc_driver_sqlite as adbc_sqlite
   import pyarrow as pa
   
   conn=adbc_sqlite.connect("C:/dbs/adbc.db")
   tbl=pa.Table.from_pydict({'numbers': [1, 2], 'letters': ['a', 'b']})
   db_cursor=conn.cursor()
   db_cursor.execute("drop table if exists adbc_bug")
   db_cursor.adbc_ingest("adbc_bug", tbl, "create")
   db_cursor.connection.commit()
   db_cursor.close()
   conn.close()
   
   The columns ("numbers","letters") have no data type definition:
   
   CREATE TABLE adbc_bug (numbers, letters)
   
   It should be:
   
   CREATE TABLE adbc_bug (numbers INTEGER,letters TEXT)
   
   Thanks


-- 
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] lidavidm commented on issue #834: python/adbc_driver_sqlite: adbc_ingest creates table without defining the datatypes

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

   Ah, fair. I suggested the three as things we could progressively implement, but I think just having a sensible-enough mapping (and a way to turn it off?) should be enough.


-- 
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] Prussian1870 commented on issue #834: python/adbc_driver_sqlite: adbc_ingest creates table without defining the datatypes

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

   Agreed. This mimics Pandas and Polars too


-- 
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 #834: python/adbc_driver_sqlite: adbc_ingest creates table without defining the datatypes

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

   We could do something like this:
   - Add type names by default, based on the Arrow type
   - Add options to control this default mapping, or disable it
   - Define a per-Arrow schema field metadata key that, if present, will be used as the type name instead
   
   Thoughts?
   
   Also CC @paleolimbot, @ywc88 for opinions


-- 
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 closed issue #834: python/adbc_driver_sqlite: adbc_ingest creates table without defining the datatypes

Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm closed issue #834: python/adbc_driver_sqlite: adbc_ingest creates table without defining the datatypes
URL: https://github.com/apache/arrow-adbc/issues/834


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

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


[GitHub] [arrow-adbc] paleolimbot commented on issue #834: python/adbc_driver_sqlite: adbc_ingest creates table without defining the datatypes

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

   Without having too much experience here, I would lean towards "Add type names by default, based on the Arrow type". The second two options are probably better handled by the caller running their own `CREATE TABLE` before `adbc_ingest()` (which can also append to an existing table if I understand correctly?)


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