dongjoon-hyun commented on PR #49722: URL: https://github.com/apache/spark/pull/49722#issuecomment-2623232160
After validating in branch-3.5 like the following, I pushed. ``` $ bin/spark-shell Setting default log level to "WARN". To adjust logging level use sc.setLogLevel(newLevel). For SparkR, use setLogLevel(newLevel). [SPARK-51027][SQL] Prevent `HiveClient.runSqlHive` invocation in non-testing environment 25/01/29 16:18:39 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable 25/01/29 16:18:39 WARN Utils: Service 'SparkUI' could not bind on port 4040. Attempting port 4041. Spark context Web UI available at http://localhost:4041 Spark context available as 'sc' (master = local[*], app id = local-1738196319641). Spark session available as 'spark'. Welcome to ____ __ / __/__ ___ _____/ /__ _\ \/ _ \/ _ `/ __/ '_/ /___/ .__/\_,_/_/ /_/\_\ version 3.5.5-SNAPSHOT /_/ Using Scala version 2.12.18 (OpenJDK 64-Bit Server VM, Java 17.0.14) Type in expressions to have them evaluated. Type :help for more information. scala> :paste -raw // Entering paste mode (ctrl-D to finish) package org.apache.spark object myObject { val spark = org.apache.spark.sql.SparkSession.getActiveSession.get val client = spark.sharedState.externalCatalog.unwrapped.asInstanceOf[org.apache.spark.sql.hive.HiveExternalCatalog].client client.runSqlHive("SHOW TABLES") } // Exiting paste mode, now interpreting. scala> org.apache.spark.myObject 25/01/29 16:18:59 WARN HiveConf: HiveConf of name hive.stats.jdbc.timeout does not exist 25/01/29 16:18:59 WARN HiveConf: HiveConf of name hive.stats.retries.wait does not exist 25/01/29 16:19:00 WARN ObjectStore: Version information not found in metastore. hive.metastore.schema.verification is not enabled so recording the schema version 2.3.0 25/01/29 16:19:00 WARN ObjectStore: setMetaStoreSchemaVersion called but recording version is disabled: version = 2.3.0, comment = Set by MetaStore [email protected] 25/01/29 16:19:00 WARN ObjectStore: Failed to get database default, returning NoSuchObjectException java.lang.AssertionError: assertion failed: spark.testing is not set to true at scala.Predef$.assert(Predef.scala:223) at org.apache.spark.sql.hive.client.HiveClientImpl.runSqlHive(HiveClientImpl.scala:850) at org.apache.spark.myObject$.<init>(<pastie>:6) at org.apache.spark.myObject$.<clinit>(<pastie>) ... 47 elided scala> :quit ``` -- 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]
