AnuragKDwivedi commented on code in PR #56356:
URL: https://github.com/apache/spark/pull/56356#discussion_r3378939678
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/connector/catalog/CatalogV2Util.scala:
##########
@@ -78,6 +78,17 @@ private[sql] object CatalogV2Util {
SupportsNamespaces.PROP_LOCATION,
SupportsNamespaces.PROP_OWNER)
+ /**
+ * Checks if a location string is blank (empty or contains only whitespace
characters).
+ * This validation is used to reject invalid database/namespace locations.
+ *
+ * @param location the location string to validate
+ * @return true if the location is null, empty, or contains only whitespace
+ */
+ def isBlankLocation(location: String): Boolean = {
Review Comment:
Thanks @cloud-fan for the suggestion. I have updated the PR to use the
existing `SparkStringUtils.isBlank(...)` utility instead of introducing a new
helper and restored the corresponding imports. Using the existing utility
provides broader whitespace handling via `String.isBlank`, as you noted.
Could you please take another look when you have a chance? 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]