You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by "pan3793 (via GitHub)" <gi...@apache.org> on 2023/06/01 03:38:11 UTC

[GitHub] [kyuubi] pan3793 opened a new pull request, #4915: SCHEMA_NOT_FOUND

pan3793 opened a new pull request, #4915:
URL: https://github.com/apache/kyuubi/pull/4915

   <!--
   Thanks for sending a pull request!
   
   Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://kyuubi.readthedocs.io/en/latest/community/CONTRIBUTING.html
     2. If the PR is related to an issue in https://github.com/apache/kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'.
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][KYUUBI #XXXX] Your PR title ...'.
   -->
   
   ### _Why are the changes needed?_
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you add a feature, you can talk about the use case of it.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   
   Spark is migrating to the error class framework, in SPARK-40360(fixed in 3.4.0) SCHEMA_NOT_FOUND was introduced, which changes the output of the error message on switching a not existing database.
   
   ### _How was this patch tested?_
   - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
   
   - [ ] Add screenshots for manual tests if appropriate
   
   - [x] [Run test](https://kyuubi.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request
   


-- 
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: notifications-unsubscribe@kyuubi.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [kyuubi] pan3793 commented on pull request #4915: Adapt database not exist error message change for Spark 3.4

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on PR #4915:
URL: https://github.com/apache/kyuubi/pull/4915#issuecomment-1571392300

   Thanks, merged to master/1.7


-- 
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: notifications-unsubscribe@kyuubi.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [kyuubi] pan3793 commented on pull request #4915: Adapt database not exist error message change for Spark 3.4

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on PR #4915:
URL: https://github.com/apache/kyuubi/pull/4915#issuecomment-1571391821

   This PR is not related to lineage. If you are asking if it's ok to introduce a common label of `[LINEAGE]` for other PRs, I'm fine as long as the label is short and straightforward.


-- 
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: notifications-unsubscribe@kyuubi.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [kyuubi] cfmcgrady commented on pull request #4915: Adapt database not exist error message change for Spark 3.4

Posted by "cfmcgrady (via GitHub)" <gi...@apache.org>.
cfmcgrady commented on PR #4915:
URL: https://github.com/apache/kyuubi/pull/4915#issuecomment-1571293144

   shall we address L66 as well?


-- 
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: notifications-unsubscribe@kyuubi.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [kyuubi] bowenliang123 commented on a diff in pull request #4915: Adapt database not exist error message change for Spark 3.4

Posted by "bowenliang123 (via GitHub)" <gi...@apache.org>.
bowenliang123 commented on code in PR #4915:
URL: https://github.com/apache/kyuubi/pull/4915#discussion_r1212585166


##########
externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/session/SparkSessionImpl.scala:
##########
@@ -74,7 +74,7 @@ class SparkSessionImpl(
       } catch {
         case e
             if database == "default" && e.getMessage != null &&
-              e.getMessage.contains("not found") =>
+              (e.getMessage.contains("not found") || e.getMessage.contains("SCHEMA_NOT_FOUND")) =>

Review Comment:
   ```
             if database == "default"
               && StringUtils.containsAny(e.getMessage, "not found", "SCHEMA_NOT_FOUND") =>
   ```



-- 
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: notifications-unsubscribe@kyuubi.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [kyuubi] pan3793 closed pull request #4915: Adapt database not exist error message change for Spark 3.4

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 closed pull request #4915: Adapt database not exist error message change for Spark 3.4
URL: https://github.com/apache/kyuubi/pull/4915


-- 
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: notifications-unsubscribe@kyuubi.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [kyuubi] pan3793 commented on a diff in pull request #4915: Adapt database not exist error message change for Spark 3.4

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #4915:
URL: https://github.com/apache/kyuubi/pull/4915#discussion_r1212603493


##########
externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/session/SparkSessionImpl.scala:
##########
@@ -74,7 +74,7 @@ class SparkSessionImpl(
       } catch {
         case e
             if database == "default" && e.getMessage != null &&
-              e.getMessage.contains("not found") =>
+              (e.getMessage.contains("not found") || e.getMessage.contains("SCHEMA_NOT_FOUND")) =>

Review Comment:
   adopted



-- 
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: notifications-unsubscribe@kyuubi.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [kyuubi] pan3793 commented on pull request #4915: Adapt database not exist error message change for Spark 3.4

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on PR #4915:
URL: https://github.com/apache/kyuubi/pull/4915#issuecomment-1571294898

   > shall we address L66 as well?
   
   Seems not necessary, because we catch can rethrow the exception
   
   ```
     override def setCurrentCatalog(spark: SparkSession, catalog: String): Unit = {
       // SPARK-36841(3.3.0) Ensure setCurrentCatalog method catalog must exist
       if (spark.sessionState.catalogManager.isCatalogRegistered(catalog)) {
         spark.sessionState.catalogManager.setCurrentCatalog(catalog)
       } else {
         throw new IllegalArgumentException(s"Cannot find catalog plugin class for catalog '$catalog'")
       }
     }
   ```


-- 
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: notifications-unsubscribe@kyuubi.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org