You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/11/27 21:46:00 UTC

[GitHub] [arrow-datafusion] mvanschellebeeck opened a new issue, #4396: Support CREATE TABLE table_name(...schema_fields)

mvanschellebeeck opened a new issue, #4396:
URL: https://github.com/apache/arrow-datafusion/issues/4396

   **Describe the solution you'd like**
   Support the CREATE TABLE expression, e.g.
   `CREATE TABLE t1(a INTEGER, b INTEGER, c INTEGER, d INTEGER, e INTEGER);`
   
   Executing this with `datafusion-cli` shows:
   ```bash
   DataFusion CLI v14.0.0
   ❯ CREATE TABLE t1(a INTEGER, b INTEGER, c INTEGER, d INTEGER, e INTEGER);
   NotImplemented("Only `CREATE TABLE table_name AS SELECT ...` statement is supported")
   ```
   
   **Additional context**
   The ability to create a table with one statement and then insert values into it throughout a sessions forms the basis of a lot of [sqllogictests](https://www.sqlite.org/sqllogictest/file?name=test/select1.test&ci=tip) we want to incorporate into testing. See https://github.com/apache/arrow-datafusion/issues/4248
   


-- 
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.apache.org

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


[GitHub] [arrow-datafusion] alamb closed issue #4396: Support CREATE TABLE table_name(...schema_fields)

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb closed issue #4396: Support CREATE TABLE table_name(...schema_fields)
URL: https://github.com/apache/arrow-datafusion/issues/4396


-- 
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-datafusion] xudong963 commented on issue #4396: Support CREATE TABLE table_name(...schema_fields)

Posted by GitBox <gi...@apache.org>.
xudong963 commented on issue #4396:
URL: https://github.com/apache/arrow-datafusion/issues/4396#issuecomment-1335187032

   I'll do it (maybe on the weekend)


-- 
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-datafusion] melgenek commented on issue #4396: Support CREATE TABLE table_name(...schema_fields)

Posted by "melgenek (via GitHub)" <gi...@apache.org>.
melgenek commented on issue #4396:
URL: https://github.com/apache/arrow-datafusion/issues/4396#issuecomment-1399588524

   @xudong963 Hi! I see that the ticket is assigned to you, but I gave it a shot. I hope it's alright 🙂 . Here is the pr https://github.com/apache/arrow-datafusion/pull/5026.


-- 
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-datafusion] mvanschellebeeck commented on issue #4396: Support CREATE TABLE table_name(...schema_fields)

Posted by GitBox <gi...@apache.org>.
mvanschellebeeck commented on issue #4396:
URL: https://github.com/apache/arrow-datafusion/issues/4396#issuecomment-1328347303

   An example of a set of queries we'd like to execute are:
   ```sql
   statement ok
   CREATE TABLE t1(a INTEGER, b INTEGER, c INTEGER, d INTEGER, e INTEGER)
   
   statement ok
   INSERT INTO t1(e,c,b,d,a) VALUES(103,102,100,101,104)
   
   statement ok
   INSERT INTO t1(a,c,d,e,b) VALUES(107,106,108,109,105)
   
   ...
   
   statement ok
   INSERT INTO t1(e,c,a,d,b) VALUES(177,176,179,178,175)
   
   statement ok
   INSERT INTO t1(b,e,a,d,c) VALUES(181,180,182,183,184)
   
   statement ok
   INSERT INTO t1(c,a,b,e,d) VALUES(187,188,186,189,185)
   
   statement ok
   INSERT INTO
   
   statement ok
   INSERT INTO t1(e,c,b,a,d) VALUES(242,244,240,243,241)
   
   statement ok
   INSERT INTO t1(e,d,c,b,a) VALUES(246,248,247,249,245)
   
   query I nosort
   SELECT CASE WHEN c>(SELECT avg(c) FROM t1) THEN a*2 ELSE b*10 END
     FROM t1
    ORDER BY 1
   ----
   30 values hashing to 3c13dee48d9356ae19af2515e05e6b54
   ```
   see [here](https://www.sqlite.org/sqllogictest/file?name=test/select1.test&ci=tip) for reference)
   
   Currently this is not possible since the `CREATE TABLE` expression is not supported.


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