You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "nbenn (via GitHub)" <gi...@apache.org> on 2023/08/31 15:01:34 UTC
[GitHub] [arrow-adbc] nbenn opened a new issue, #1018: Feature: Bulk ingestion as temporary table
nbenn opened a new issue, #1018:
URL: https://github.com/apache/arrow-adbc/issues/1018
An `adbc.ingest.mode.temporary` ingestion mode might be useful.
--
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 #1018: Feature: Bulk ingestion as temporary table
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #1018:
URL: https://github.com/apache/arrow-adbc/issues/1018#issuecomment-1703093189
Ideally we'd add the new option to adbc.h, but things like this feel like we shouldn't have to go through a whole revision. Given it's just a config option, maybe we can just add it without bumping the version (or else, we can just have all drivers support it and formally add it to the header the next time we do actually bump the version).
Thoughts @zeroshade @paleolimbot @kou?
--
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] paleolimbot commented on issue #1018: Feature: Bulk ingestion as temporary table
Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot commented on issue #1018:
URL: https://github.com/apache/arrow-adbc/issues/1018#issuecomment-1703146482
I don't have any opinions about the versioning since I'm rather new to the place where this matters (although it seems like what you proposed sounds reasonable).
I will add that the initial motivation is because `dbplyr::copy_to()` ( https://dbplyr.tidyverse.org/reference/copy_to.src_sql.html ) and `DBI::dbCreateTable()` ( https://dbi.r-dbi.org/reference/dbcreatetable ) has a `temporary` argument that is frequently invoked during testing/documentation (@nbenn correct me if I'm wrong!). It also shows up in SQL generation (e.g., when joining a lazy SQL query with a small in-memory lookup table).
--
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 #1018: Feature: Bulk ingestion as temporary table
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #1018:
URL: https://github.com/apache/arrow-adbc/issues/1018#issuecomment-1716104793
I'm working on this now, sorry - but you generally don't need to differentiate:
```
sqlite> CREATE TEMP TABLE foo (bar);
sqlite> INSERT INTO foo VALUES (1);
sqlite> SELECT * FROM main.foo;
Error: no such table: main.foo
sqlite> SELECT * FROM temp.foo;
1
sqlite> SELECT * FROM foo;
1
```
[MSSQL does require you to refer to the table specially](https://learn.microsoft.com/en-us/sql/t-sql/statements/create-table-transact-sql?view=sql-server-ver16#temporary-tables), though.
--
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] kou commented on issue #1018: Feature: Bulk ingestion as temporary table
Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on issue #1018:
URL: https://github.com/apache/arrow-adbc/issues/1018#issuecomment-1703389634
How does `adbc.ingest.mode.temporary` work?
It creates a new temporary table and `INSERT` data to the created temporary table, right?
I think that we can add it as an experimental feature to 1.1.0 because it just adds an option value to an existing option. And we can mark it as a stable feature when we release 1.2.0.
--
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] judahrand commented on issue #1018: Feature: Bulk ingestion as temporary table
Posted by "judahrand (via GitHub)" <gi...@apache.org>.
judahrand commented on issue #1018:
URL: https://github.com/apache/arrow-adbc/issues/1018#issuecomment-1716099669
> The latter (from a quick glance, databases 'just' implement temporary tables as tables in a special namespace so it should be orthogonal to create/append/etc IMO)
In that case another question on behaviour:
Do we enforce that the table must be temporary when, for example, appending? In Postgres for example I can do
```sql
CREATE TEMPORARY TABLE foo
INSERT INTO foo...
```
Unless I created the table the insert statement doesn't (afaik) know that the table is temporary. Equally for the replace mode - do we drop a non-temp table and create a temp table?
--
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 #1018: Feature: Bulk ingestion as temporary table
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #1018:
URL: https://github.com/apache/arrow-adbc/issues/1018#issuecomment-1716120455
Ah, good point. I think I would favor being explicit.
--
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] judahrand commented on issue #1018: Feature: Bulk ingestion as temporary table
Posted by "judahrand (via GitHub)" <gi...@apache.org>.
judahrand commented on issue #1018:
URL: https://github.com/apache/arrow-adbc/issues/1018#issuecomment-1716080491
For clarity, is the idea here to add a new ingestion mode (like create_append/create/append/create_replace) or to add an option which would be compatible with all ingestion modes?
--
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] judahrand commented on issue #1018: Feature: Bulk ingestion as temporary table
Posted by "judahrand (via GitHub)" <gi...@apache.org>.
judahrand commented on issue #1018:
URL: https://github.com/apache/arrow-adbc/issues/1018#issuecomment-1716112188
> I'm working on this now, sorry - but you generally don't need to differentiate:
I appreciate that you mostly don't have to in the SQL - it was more a question of whether the driver should be able to drop/edit a non-temporary table then the ingest option is false? Unless carefully documented a user could easily misunderstand and result in data loss.
--
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 #1018: Feature: Bulk ingestion as temporary table
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #1018:
URL: https://github.com/apache/arrow-adbc/issues/1018#issuecomment-1716083368
The latter
--
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 #1018: Feature: Bulk ingestion as temporary table
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm closed issue #1018: Feature: Bulk ingestion as temporary table
URL: https://github.com/apache/arrow-adbc/issues/1018
--
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] lidavidm commented on issue #1018: Feature: Bulk ingestion as temporary table
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #1018:
URL: https://github.com/apache/arrow-adbc/issues/1018#issuecomment-1716107907
In Postgres, you can see how it shadows existing tables with the same name:
```
postgres=# CREATE TEMP TABLE foo (bar INT);
CREATE TABLE
postgres=# INSERT INTO foo VALUES (1);
INSERT 0 1
postgres=# SELECT * FROM foo;
bar
-----
1
(1 row)
postgres=# SELECT * FROM pg_temp.foo;
bar
-----
1
(1 row)
postgres=# SELECT * FROM public.foo;
col
------------------------
1970-01-02 02:34:05+00
(1 row)
```
--
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