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

   ### Is your feature request related to a problem or challenge?
   
   The following syntax to define primary key 
   ```sql
   statement ok
   CREATE EXTERNAL TABLE multiple_ordered_table2 (
     a0 INTEGER,
     a INTEGER,
     b INTEGER,
     c INTEGER,
     d INTEGER,
     primary key(c)
   )
   STORED AS CSV
   WITH HEADER ROW
   LOCATION 'tests/data/window_2.csv';
   ```
   is not supported currently. (Datafusion accepts above query, primary key is 
not parsed and information is ignored.)
   If we were to support, above syntax following query would work without error.
   ```sql
   SELECT c, b, SUM(d)
   FROM multiple_ordered_table2
   GROUP BY c;
   ```
   Currently, above query gives error.
   Similar in [issue 
7152](https://github.com/apache/arrow-datafusion/issues/7152) 
   ```sql
   statement ok
   CREATE EXTERNAL TABLE multiple_ordered_table2 (
     a0 INTEGER,
     a INTEGER,
     b INTEGER,
     c INTEGER primary key,
     d INTEGER
   )
   STORED AS CSV
   WITH HEADER ROW
   LOCATION 'tests/data/window_2.csv';
   ```
   syntax is not supported either for external tables.
   
   ### Describe the solution you'd like
   
   I would like to have this support.
   
   ### Describe alternatives you've considered
   
   _No response_
   
   ### Additional context
   
   _No response_


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to