Skip to content

Commit 920e9ab

Browse files
committed
test: reject invalid format.coerce_int96 table option at CREATE time
1 parent 5ebeba3 commit 920e9ab

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

‎datafusion/sqllogictest/test_files/set_variable.slt‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -826,6 +826,17 @@ datafusion.execution.parquet.coerce_int96 us
826826
statement ok
827827
RESET datafusion.execution.parquet.coerce_int96
828828

829+
# Table options are validated at CREATE time too. With an explicit schema this
830+
# used to be accepted and then panic on the first scan.
831+
statement error
832+
CREATE EXTERNAL TABLE int96_bad_unit (a TIMESTAMP)
833+
STORED AS PARQUET
834+
LOCATION '../../parquet-testing/data/int96_from_spark.parquet'
835+
OPTIONS ('format.coerce_int96' 'nanos');
836+
----
837+
DataFusion error: Invalid or Unsupported Configuration: Invalid parquet coerce_int96 setting: nanos. Expected one of: ns, us, ms, s
838+
839+
829840
statement error DataFusion error: Error setting config datafusion\.execution\.batch_size\ncaused by\nInvalid or Unsupported Configuration: value must be greater than 0
830841
SET datafusion.execution.batch_size = 0
831842

0 commit comments

Comments
 (0)