vladanvasi-db commented on code in PR #59835: URL: https://github.com/apache/spark/pull/59835#discussion_r4398606890
########## sql/core/src/test/resources/sql-tests/results/show-commands.sql.out: ########## @@ -0,0 +1,156 @@ +-- Automatically generated by SQLQueryTestSuite +-- !query +SHOW CATALOGS +-- !query schema +struct<catalog:string> +-- !query output +spark_catalog + + +-- !query +SHOW CURRENT NAMESPACE +-- !query schema +struct<catalog:string,namespace:string> +-- !query output +spark_catalog default + + +-- !query +CREATE DATABASE show_commands_db +-- !query schema +struct<> +-- !query output + + + +-- !query +USE show_commands_db +-- !query schema +struct<> +-- !query output + + + +-- !query +SHOW CURRENT DATABASE +-- !query schema +struct<catalog:string,namespace:string> +-- !query output +spark_catalog show_commands_db + + +-- !query +SET CATALOG 'testcat' +-- !query schema +struct<> +-- !query output + + + +-- !query +SHOW CURRENT NAMESPACE +-- !query schema +struct<catalog:string,namespace:string> +-- !query output +testcat + + +-- !query +SHOW CATALOGS +-- !query schema +struct<catalog:string> +-- !query output +spark_catalog +testcat + + +-- !query +SHOW CATALOGS LIKE 'TEST*' +-- !query schema +struct<catalog:string> +-- !query output +testcat + + +-- !query +SHOW CATALOGS 'non_existing_catalog_pattern' +-- !query schema +struct<catalog:string> +-- !query output + + + +-- !query +CREATE NAMESPACE testcat.show_commands_ns.`inner.ns` +-- !query schema +struct<> +-- !query output + + + +-- !query +USE testcat.show_commands_ns.`inner.ns` +-- !query schema +struct<> +-- !query output + + + +-- !query +SHOW CURRENT SCHEMA +-- !query schema +struct<catalog:string,namespace:string> +-- !query output +testcat show_commands_ns.`inner.ns` + + +-- !query +USE spark_catalog.default +-- !query schema +struct<> +-- !query output + + + +-- !query +DROP NAMESPACE testcat.show_commands_ns.`inner.ns` +-- !query schema +struct<> +-- !query output + + + +-- !query +DROP DATABASE show_commands_db +-- !query schema +struct<> +-- !query output + + + +-- !query +SHOW COLLATIONS LIKE 'utf8_*|en_USA' +-- !query schema +struct<NAME:string,LANGUAGE:string,COUNTRY:string,ACCENT_SENSITIVITY:string,CASE_SENSITIVITY:string,PAD_ATTRIBUTE:string,ICU_VERSION:string> +-- !query output +UTF8_BINARY NULL NULL ACCENT_SENSITIVE CASE_SENSITIVE NO_PAD NULL +UTF8_BINARY_RTRIM NULL NULL ACCENT_SENSITIVE CASE_SENSITIVE RTRIM NULL +UTF8_LCASE NULL NULL ACCENT_SENSITIVE CASE_INSENSITIVE NO_PAD NULL +UTF8_LCASE_RTRIM NULL NULL ACCENT_SENSITIVE CASE_INSENSITIVE RTRIM NULL +en_USA English United States ACCENT_SENSITIVE CASE_SENSITIVE NO_PAD 78.3.0.0 Review Comment: Fixed in bb9eb22931a. The golden now uses `SHOW COLLATIONS LIKE 'utf8_*'`, so it no longer snapshots an ICU locale row or its version/display names. ########## sql/core/src/test/resources/sql-tests/results/show-commands.sql.out: ########## @@ -0,0 +1,156 @@ +-- Automatically generated by SQLQueryTestSuite +-- !query +SHOW CATALOGS +-- !query schema +struct<catalog:string> +-- !query output +spark_catalog + + +-- !query +SHOW CURRENT NAMESPACE +-- !query schema +struct<catalog:string,namespace:string> +-- !query output +spark_catalog default + + +-- !query +CREATE DATABASE show_commands_db +-- !query schema +struct<> +-- !query output + + + +-- !query +USE show_commands_db +-- !query schema +struct<> +-- !query output + + + +-- !query +SHOW CURRENT DATABASE +-- !query schema +struct<catalog:string,namespace:string> +-- !query output +spark_catalog show_commands_db + + +-- !query +SET CATALOG 'testcat' +-- !query schema +struct<> +-- !query output + + + +-- !query +SHOW CURRENT NAMESPACE +-- !query schema +struct<catalog:string,namespace:string> +-- !query output +testcat + + +-- !query +SHOW CATALOGS +-- !query schema +struct<catalog:string> +-- !query output +spark_catalog +testcat + + +-- !query +SHOW CATALOGS LIKE 'TEST*' +-- !query schema +struct<catalog:string> +-- !query output +testcat + + +-- !query +SHOW CATALOGS 'non_existing_catalog_pattern' +-- !query schema +struct<catalog:string> +-- !query output + + + +-- !query +CREATE NAMESPACE testcat.show_commands_ns.`inner.ns` +-- !query schema +struct<> +-- !query output + + + +-- !query +USE testcat.show_commands_ns.`inner.ns` +-- !query schema +struct<> +-- !query output + + + +-- !query +SHOW CURRENT SCHEMA +-- !query schema +struct<catalog:string,namespace:string> +-- !query output +testcat show_commands_ns.`inner.ns` + + +-- !query +USE spark_catalog.default +-- !query schema +struct<> +-- !query output + + + +-- !query +DROP NAMESPACE testcat.show_commands_ns.`inner.ns` +-- !query schema +struct<> +-- !query output + + + +-- !query +DROP DATABASE show_commands_db +-- !query schema +struct<> +-- !query output + + + +-- !query +SHOW COLLATIONS LIKE 'utf8_*|en_USA' +-- !query schema +struct<NAME:string,LANGUAGE:string,COUNTRY:string,ACCENT_SENSITIVITY:string,CASE_SENSITIVITY:string,PAD_ATTRIBUTE:string,ICU_VERSION:string> +-- !query output +UTF8_BINARY NULL NULL ACCENT_SENSITIVE CASE_SENSITIVE NO_PAD NULL +UTF8_BINARY_RTRIM NULL NULL ACCENT_SENSITIVE CASE_SENSITIVE RTRIM NULL +UTF8_LCASE NULL NULL ACCENT_SENSITIVE CASE_INSENSITIVE NO_PAD NULL +UTF8_LCASE_RTRIM NULL NULL ACCENT_SENSITIVE CASE_INSENSITIVE RTRIM NULL +en_USA English United States ACCENT_SENSITIVE CASE_SENSITIVE NO_PAD 78.3.0.0 + + +-- !query +SHOW COLLATIONS 'UTF8_BINARY' +-- !query schema +struct<NAME:string,LANGUAGE:string,COUNTRY:string,ACCENT_SENSITIVITY:string,CASE_SENSITIVITY:string,PAD_ATTRIBUTE:string,ICU_VERSION:string> +-- !query output +UTF8_BINARY NULL NULL ACCENT_SENSITIVE CASE_SENSITIVE NO_PAD NULL + + +-- !query +SHOW COLLATIONS LIKE 'non_existing_collation_pattern' Review Comment: Applied exactly these three cases and regenerated both the result and analyzer goldens in bb9eb22931a. `show-commands.sql` and `show-commands.sql_analyzer_test` both pass. @uros-b, could you take another look? Thanks! -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
