Skip to content

Commit 0bc89d6

Browse files
committed
Repair DataFusion catalog tests after identifier option update
1 parent 83a2c16 commit 0bc89d6

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

‎datafusion/catalog/src/information_schema.rs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1701,6 +1701,7 @@ mod tests {
17011701
let config = InformationSchemaConfig {
17021702
catalog_list: Arc::new(Fixture),
17031703
table_functions: HashMap::new(),
1704+
uppercase_identifiers: false,
17041705
};
17051706
let mut builder = InformationSchemaTablesBuilder {
17061707
catalog_names: StringBuilder::new(),

‎datafusion/sqllogictest/test_files/information_schema.slt‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@ datafusion.sql_parser.parse_float_as_decimal false
367367
datafusion.sql_parser.recursion_limit 50
368368
datafusion.sql_parser.support_varchar_with_length true
369369
datafusion.sql_parser.trim_decimal_literal_trailing_zeros false
370+
datafusion.sql_parser.uppercase_unquoted_identifiers false
370371

371372
# show all variables with verbose
372373
query TTT rowsort
@@ -525,14 +526,15 @@ datafusion.spark.map_key_dedup_policy EXCEPTION Policy for handling duplicate ke
525526
datafusion.sql_parser.collect_spans false When set to true, the source locations relative to the original SQL query (i.e. [`Span`](https://docs.rs/sqlparser/latest/sqlparser/tokenizer/struct.Span.html)) will be collected and recorded in the logical plan nodes.
526527
datafusion.sql_parser.default_null_ordering nulls_max Specifies the default null ordering for query results. There are 4 options: - `nulls_max`: Nulls appear last in ascending order. - `nulls_min`: Nulls appear first in ascending order. - `nulls_first`: Nulls always be first in any order. - `nulls_last`: Nulls always be last in any order. By default, `nulls_max` is used to follow Postgres's behavior. postgres rule: <https://www.postgresql.org/docs/current/queries-order.html>
527528
datafusion.sql_parser.dialect generic Configure the SQL dialect used by DataFusion's parser; supported values include: Generic, MySQL, PostgreSQL, Hive, SQLite, Snowflake, Redshift, MsSQL, ClickHouse, BigQuery, Ansi, DuckDB, Databricks, Spark.
528-
datafusion.sql_parser.enable_ident_normalization true When set to true, SQL parser will normalize ident (convert ident to lowercase when not quoted)
529+
datafusion.sql_parser.enable_ident_normalization true When set to true, normalize unquoted identifiers to lowercase by default.
529530
datafusion.sql_parser.enable_options_value_normalization false When set to true, SQL parser will normalize options value (convert value to lowercase). Note that this option is ignored and will be removed in the future. All case-insensitive values are normalized automatically.
530531
datafusion.sql_parser.enable_subquery_sort_elimination true When set to true, DataFusion may remove `ORDER BY` clauses from subqueries or CTEs during SQL planning when their ordering cannot affect the result, such as when no `LIMIT` or other order-sensitive operator depends on them. Disable this option to preserve explicit subquery ordering in the planned query.
531532
datafusion.sql_parser.map_string_types_to_utf8view true If true, string types (VARCHAR, CHAR, Text, and String) are mapped to `Utf8View` during SQL planning. If false, they are mapped to `Utf8`. Default is true.
532533
datafusion.sql_parser.parse_float_as_decimal false When set to true, SQL parser will parse float as decimal type
533534
datafusion.sql_parser.recursion_limit 50 Specifies the recursion depth limit when parsing complex SQL Queries
534535
datafusion.sql_parser.support_varchar_with_length true If true, permit lengths for `VARCHAR` such as `VARCHAR(20)`, but ignore the length. If false, error if a `VARCHAR` with a length is specified. The Arrow type system does not have a notion of maximum string length and thus DataFusion can not enforce such limits.
535536
datafusion.sql_parser.trim_decimal_literal_trailing_zeros false When set to true, insignificant trailing zeros are removed from decimal literals. For example, `10.00` is planned as `DECIMAL(2, 0)` instead of `DECIMAL(4, 2)`.
537+
datafusion.sql_parser.uppercase_unquoted_identifiers false When identifier normalization is enabled, fold unquoted relation, schema, column, and CTE identifiers to uppercase instead of lowercase. Quoted identifiers retain their exact spelling. Set this when creating the session; SQL SET/RESET cannot change it later. Catalogs and schemas used by SQL should be registered under their uppercase names. Function names still follow the existing function-registry lookup rules.
536538

537539
# show_variable_in_config_options
538540
query TT

0 commit comments

Comments
 (0)