(ctx: &SessionContext)
| 73 | mod unparser; |
| 74 | |
| 75 | async fn register_aggregate_csv_by_sql(ctx: &SessionContext) { |
| 76 | let testdata = test_util::arrow_test_data(); |
| 77 | |
| 78 | let df = ctx |
| 79 | .sql(&format!( |
| 80 | " |
| 81 | CREATE EXTERNAL TABLE aggregate_test_100 ( |
| 82 | c1 VARCHAR NOT NULL, |
| 83 | c2 TINYINT NOT NULL, |
| 84 | c3 SMALLINT NOT NULL, |
| 85 | c4 SMALLINT NOT NULL, |
| 86 | c5 INTEGER NOT NULL, |
| 87 | c6 BIGINT NOT NULL, |
| 88 | c7 SMALLINT NOT NULL, |
| 89 | c8 INT NOT NULL, |
| 90 | c9 INT UNSIGNED NOT NULL, |
| 91 | c10 BIGINT UNSIGNED NOT NULL, |
| 92 | c11 FLOAT NOT NULL, |
| 93 | c12 DOUBLE NOT NULL, |
| 94 | c13 VARCHAR NOT NULL |
| 95 | ) |
| 96 | STORED AS CSV |
| 97 | LOCATION '{testdata}/csv/aggregate_test_100.csv' |
| 98 | OPTIONS ('format.has_header' 'true') |
| 99 | " |
| 100 | )) |
| 101 | .await |
| 102 | .expect("Creating dataframe for CREATE EXTERNAL TABLE"); |
| 103 | |
| 104 | // Mimic the CLI and execute the resulting plan -- even though it |
| 105 | // is effectively a no-op (returns zero rows) |
| 106 | let results = df.collect().await.expect("Executing CREATE EXTERNAL TABLE"); |
| 107 | assert!( |
| 108 | results.is_empty(), |
| 109 | "Expected no rows from executing CREATE EXTERNAL TABLE" |
| 110 | ); |
| 111 | } |
| 112 | |
| 113 | async fn register_aggregate_csv(ctx: &SessionContext) -> Result<()> { |
| 114 | let testdata = test_util::arrow_test_data(); |
no test coverage detected
searching dependent graphs…