Re: [PR] [SPARK-48305][SQL] Add collation support for CurrentLike expressions [spark]

2024-05-20 Thread via GitHub


cloud-fan closed pull request #46613: [SPARK-48305][SQL] Add collation support 
for CurrentLike expressions
URL: https://github.com/apache/spark/pull/46613


-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



Re: [PR] [SPARK-48305][SQL] Add collation support for CurrentLike expressions [spark]

2024-05-20 Thread via GitHub


cloud-fan commented on PR #46613:
URL: https://github.com/apache/spark/pull/46613#issuecomment-2119875905

   thanks, merging to master!


-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



Re: [PR] [SPARK-48305][SQL] Add collation support for CurrentLike expressions [spark]

2024-05-17 Thread via GitHub


uros-db commented on code in PR #46613:
URL: https://github.com/apache/spark/pull/46613#discussion_r1604449148


##
sql/core/src/test/scala/org/apache/spark/sql/CollationSQLExpressionsSuite.scala:
##
@@ -997,6 +997,32 @@ class CollationSQLExpressionsSuite
 })
   }
 
+  test("Support CurrentDatabase/Catalog/User expressions with collation") {
+// Supported collations
+Seq("UTF8_BINARY_LCASE", "UNICODE", "UNICODE_CI").foreach(collationName =>
+  withSQLConf(SqlApiConf.DEFAULT_COLLATION -> collationName) {
+val queryDatabase = sql("SELECT current_schema()")
+val queryCatalog = sql("SELECT current_catalog()")
+val queryUser = sql("SELECT current_user()")
+// Result

Review Comment:
   makes sense, fixing now - 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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



Re: [PR] [SPARK-48305][SQL] Add collation support for CurrentLike expressions [spark]

2024-05-17 Thread via GitHub


cloud-fan commented on code in PR #46613:
URL: https://github.com/apache/spark/pull/46613#discussion_r1604442771


##
sql/core/src/test/scala/org/apache/spark/sql/CollationSQLExpressionsSuite.scala:
##
@@ -997,6 +997,32 @@ class CollationSQLExpressionsSuite
 })
   }
 
+  test("Support CurrentDatabase/Catalog/User expressions with collation") {
+// Supported collations
+Seq("UTF8_BINARY_LCASE", "UNICODE", "UNICODE_CI").foreach(collationName =>
+  withSQLConf(SqlApiConf.DEFAULT_COLLATION -> collationName) {
+val queryDatabase = sql("SELECT current_schema()")
+val queryCatalog = sql("SELECT current_catalog()")
+val queryUser = sql("SELECT current_user()")
+// Result

Review Comment:
   This patch only changes return types and we should only test data types, not 
results. We should avoid duplicated tests to reduce overhead when we make 
behavior changes in the future and need to update tests.



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



Re: [PR] [SPARK-48305][SQL] Add collation support for CurrentLike expressions [spark]

2024-05-17 Thread via GitHub


cloud-fan commented on code in PR #46613:
URL: https://github.com/apache/spark/pull/46613#discussion_r1604442771


##
sql/core/src/test/scala/org/apache/spark/sql/CollationSQLExpressionsSuite.scala:
##
@@ -997,6 +997,32 @@ class CollationSQLExpressionsSuite
 })
   }
 
+  test("Support CurrentDatabase/Catalog/User expressions with collation") {
+// Supported collations
+Seq("UTF8_BINARY_LCASE", "UNICODE", "UNICODE_CI").foreach(collationName =>
+  withSQLConf(SqlApiConf.DEFAULT_COLLATION -> collationName) {
+val queryDatabase = sql("SELECT current_schema()")
+val queryCatalog = sql("SELECT current_catalog()")
+val queryUser = sql("SELECT current_user()")
+// Result

Review Comment:
   This patch only changes return types and we should only test data types, not 
results. We should avoid duplicated tests as it introduces behavior changes 
when we make behavior changes in the future and need to update tests.



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



Re: [PR] [SPARK-48305][SQL] Add collation support for CurrentLike expressions [spark]

2024-05-17 Thread via GitHub


cloud-fan commented on code in PR #46613:
URL: https://github.com/apache/spark/pull/46613#discussion_r1604442771


##
sql/core/src/test/scala/org/apache/spark/sql/CollationSQLExpressionsSuite.scala:
##
@@ -997,6 +997,32 @@ class CollationSQLExpressionsSuite
 })
   }
 
+  test("Support CurrentDatabase/Catalog/User expressions with collation") {
+// Supported collations
+Seq("UTF8_BINARY_LCASE", "UNICODE", "UNICODE_CI").foreach(collationName =>
+  withSQLConf(SqlApiConf.DEFAULT_COLLATION -> collationName) {
+val queryDatabase = sql("SELECT current_schema()")
+val queryCatalog = sql("SELECT current_catalog()")
+val queryUser = sql("SELECT current_user()")
+// Result

Review Comment:
   This only changes return types and we should only test data types, not 
results. We should avoid duplicated tests as it introduces behavior changes 
when we make behavior changes in the future and need to update tests.



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



Re: [PR] [SPARK-48305][SQL] Add collation support for CurrentLike expressions [spark]

2024-05-16 Thread via GitHub


uros-db commented on PR #46613:
URL: https://github.com/apache/spark/pull/46613#issuecomment-2115241390

   @cloud-fan ready for review


-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org