xi-db commented on code in PR #54113:
URL: https://github.com/apache/spark/pull/54113#discussion_r2878466512
##########
sql/connect/server/src/main/scala/org/apache/spark/sql/connect/service/SparkConnectAnalyzeHandler.scala:
##########
@@ -69,9 +70,23 @@ private[connect] class SparkConnectAnalyzeHandler(
throw new
AnalysisException("ATTEMPT_ANALYSIS_IN_PIPELINE_QUERY_FUNCTION", Map())
}
+ // Log compressed sizes from gRPC Context (set by
RequestDecompressionInterceptor)
+ val compressedSize = RequestDecompressionContext.getCompressedSize
+ val otherCompressedSize =
RequestDecompressionContext.getOtherCompressedSize
+ if (compressedSize.isDefined || otherCompressedSize.isDefined) {
+ logDebug(
+ log"AnalyzePlan request received with compressed plan: " +
+ log"compressedSize=${MDC(BYTE_SIZE, compressedSize.getOrElse(0L))}
bytes" +
+ otherCompressedSize
+ .map { size =>
+ log", otherCompressedSize=${MDC(BYTE_SIZE, size)} bytes"
+ }
+ .getOrElse(log""))
+ }
+
def transformRelation(rel: proto.Relation) =
planner.transformRelation(rel, cachePlan = true)
def transformRelationPlan(plan: proto.Plan) = {
Review Comment:
Yes, but I would like to keep it because if we want to have plan-level
operations in the future we will need this tiny helper back. Changed this to
one-line `def transformRelationPlan(plan: proto.Plan) =
transformRelation(plan.getRoot)` to be simple.
--
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]