devinjdangelo commented on issue #7860:
URL: 
https://github.com/apache/arrow-datafusion/issues/7860#issuecomment-1769347731

   > Ran against your branch and the only problem was lack of timestamp 
support. Coercing to a TEXT type causing a schema error unfortunately.
   
   How did you coerce? If you define your table so that the partition columns 
are of type STRING like below and also convert incoming timestamps to strings 
it should work. Basically the DDL of the table and the schema of the data to be 
written must both be string for any partition column currently. Some auto 
casting between common partitioning types would definitely be a nice 
improvement in the future.
   
   ```sql
   CREATE EXTERNAL TABLE
   partitioned_insert_test_pq(a string, b bigint)
   STORED AS parquet
   LOCATION 'test_files/scratch/insert_to_external/insert_to_partitioned_pq/'
   PARTITIONED BY (a) 
   OPTIONS(
   create_local_path 'true',
   insert_mode 'append_new_files',
   );
   
   INSERT INTO partitioned_insert_test_pq values (1, 2), (3, 4), (5, 6), (1, 
2), (3, 4), (5, 6);
   ----
   6
   
   select * from partitioned_insert_test_pq order by a ASC, b ASC
   ----
   1 2
   1 2
   3 4
   3 4
   5 6
   5 6
   ```
   


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