Skip to content

Commit 1e3dc52

Browse files
zhaomin1423pan3793
authored andcommitted
[KYUUBI #3297] [MINOR] Null is replaced by KyuubiSQLException.featureNotSupported()
### _Why are the changes needed?_ ### _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 - [ ] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request Closes #3297 from zhaomin1423/minor_null. Closes #3297 9008737 [Min] [MINOR] Null is replaced by KyuubiSQLException.featureNotSupported() Authored-by: Min <zhaomin1423@163.com> Signed-off-by: Cheng Pan <chengpan@apache.org>
1 parent 84b164e commit 1e3dc52

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

kyuubi-server/src/main/scala/org/apache/kyuubi/operation/KyuubiOperationManager.scala

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import java.util.concurrent.TimeUnit
2121

2222
import org.apache.hive.service.rpc.thrift.TRowSet
2323

24+
import org.apache.kyuubi.KyuubiSQLException
2425
import org.apache.kyuubi.config.KyuubiConf
2526
import org.apache.kyuubi.config.KyuubiConf.OPERATION_QUERY_TIMEOUT
2627
import org.apache.kyuubi.metrics.MetricsConstants.OPERATION_OPEN
@@ -87,19 +88,19 @@ class KyuubiOperationManager private (name: String) extends OperationManager(nam
8788

8889
// The server does not use these 4 operations
8990
override def newSetCurrentCatalogOperation(session: Session, catalog: String): Operation = {
90-
null
91+
throw KyuubiSQLException.featureNotSupported()
9192
}
9293

9394
override def newGetCurrentCatalogOperation(session: Session): Operation = {
94-
null
95+
throw KyuubiSQLException.featureNotSupported()
9596
}
9697

9798
override def newSetCurrentDatabaseOperation(session: Session, database: String): Operation = {
98-
null
99+
throw KyuubiSQLException.featureNotSupported()
99100
}
100101

101102
override def newGetCurrentDatabaseOperation(session: Session): Operation = {
102-
null
103+
throw KyuubiSQLException.featureNotSupported()
103104
}
104105

105106
override def newGetTypeInfoOperation(session: Session): Operation = {

0 commit comments

Comments
 (0)