Skip to content

Commit 97590fe

Browse files
committed
Remove old test
1 parent 652d28d commit 97590fe

File tree

1 file changed

+2
-67
lines changed

1 file changed

+2
-67
lines changed

datafusion/sql/tests/sql_integration.rs

Lines changed: 2 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,10 @@ use datafusion_common::{
2929
};
3030
use datafusion_expr::{
3131
col,
32-
dml::CopyTo,
3332
logical_plan::{LogicalPlan, Prepare},
3433
test::function_stub::sum_udaf,
35-
ColumnarValue, CreateExternalTable, CreateIndex, DdlStatement, ScalarUDF,
36-
ScalarUDFImpl, Signature, Statement, Volatility,
34+
ColumnarValue, CreateIndex, DdlStatement, ScalarUDF, ScalarUDFImpl, Signature,
35+
Statement, Volatility,
3736
};
3837
use datafusion_functions::{string, unicode};
3938
use datafusion_sql::{
@@ -161,70 +160,6 @@ fn parse_ident_normalization() {
161160
}
162161
}
163162

164-
#[test]
165-
fn test_parse_options_value_normalization() {
166-
let test_data = [
167-
(
168-
"CREATE EXTERNAL TABLE test OPTIONS ('location' 'LoCaTiOn') STORED AS PARQUET LOCATION 'fake_location'",
169-
"CreateExternalTable: Bare { table: \"test\" }",
170-
HashMap::from([("format.location", "LoCaTiOn")]),
171-
false,
172-
),
173-
(
174-
"CREATE EXTERNAL TABLE test OPTIONS ('location' 'LoCaTiOn') STORED AS PARQUET LOCATION 'fake_location'",
175-
"CreateExternalTable: Bare { table: \"test\" }",
176-
HashMap::from([("format.location", "location")]),
177-
true,
178-
),
179-
(
180-
"COPY test TO 'fake_location' STORED AS PARQUET OPTIONS ('location' 'LoCaTiOn')",
181-
"CopyTo: format=csv output_url=fake_location options: (format.location LoCaTiOn)\n TableScan: test",
182-
HashMap::from([("format.location", "LoCaTiOn")]),
183-
false,
184-
),
185-
(
186-
"COPY test TO 'fake_location' STORED AS PARQUET OPTIONS ('location' 'LoCaTiOn')",
187-
"CopyTo: format=csv output_url=fake_location options: (format.location location)\n TableScan: test",
188-
HashMap::from([("format.location", "location")]),
189-
true,
190-
),
191-
];
192-
193-
for (sql, expected_plan, expected_options, enable_options_value_normalization) in
194-
test_data
195-
{
196-
let plan = logical_plan_with_options(
197-
sql,
198-
ParserOptions {
199-
parse_float_as_decimal: false,
200-
enable_ident_normalization: false,
201-
support_varchar_with_length: false,
202-
enable_options_value_normalization,
203-
},
204-
);
205-
if let Ok(plan) = plan {
206-
assert_eq!(expected_plan, format!("{plan}"));
207-
208-
match plan {
209-
LogicalPlan::Ddl(DdlStatement::CreateExternalTable(
210-
CreateExternalTable { options, .. },
211-
))
212-
| LogicalPlan::Copy(CopyTo { options, .. }) => {
213-
expected_options.iter().for_each(|(k, v)| {
214-
assert_eq!(Some(&v.to_string()), options.get(*k));
215-
});
216-
}
217-
_ => panic!(
218-
"Expected Ddl(CreateExternalTable) or Copy(CopyTo) but got {:?}",
219-
plan
220-
),
221-
}
222-
} else {
223-
assert_eq!(expected_plan, plan.unwrap_err().strip_backtrace());
224-
}
225-
}
226-
}
227-
228163
#[test]
229164
fn select_no_relation() {
230165
quick_test(

0 commit comments

Comments
 (0)