yaooqinn commented on a change in pull request #1391:
URL: https://github.com/apache/incubator-kyuubi/pull/1391#discussion_r750038744
##########
File path:
kyuubi-server/src/main/scala/org/apache/kyuubi/operation/KyuubiOperation.scala
##########
@@ -58,11 +58,13 @@ abstract class KyuubiOperation(opType: OperationType,
session: Session)
}
val ke = e match {
case kse: KyuubiSQLException => kse
- case te: TTransportException if te.getType ==
TTransportException.END_OF_FILE &&
- StringUtils.isEmpty(te.getMessage) =>
+ case te: TTransportException
+ if te.getType == TTransportException.END_OF_FILE &&
Review comment:
keep the guard clause in the case-match looks better
##########
File path:
kyuubi-server/src/main/scala/org/apache/kyuubi/operation/KyuubiOperation.scala
##########
@@ -58,11 +58,13 @@ abstract class KyuubiOperation(opType: OperationType,
session: Session)
}
val ke = e match {
case kse: KyuubiSQLException => kse
- case te: TTransportException if te.getType ==
TTransportException.END_OF_FILE &&
- StringUtils.isEmpty(te.getMessage) =>
+ case te: TTransportException
+ if te.getType == TTransportException.END_OF_FILE &&
+ StringUtils.isEmpty(te.getMessage) =>
// https://issues.apache.org/jira/browse/THRIFT-4858
KyuubiSQLException(
- s"Error $action $opType: Socket for ${session.handle} is
closed", e)
+ s"Error $action $opType: Socket for ${session.handle} is
closed",
+ e)
Review comment:
unnecessary?
--
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]