anew commented on code in PR #55589:
URL: https://github.com/apache/spark/pull/55589#discussion_r3276727625
##########
sql/connect/server/src/main/scala/org/apache/spark/sql/connect/pipelines/PipelinesHandler.scala:
##########
@@ -367,24 +367,31 @@ private[connect] object PipelinesHandler extends Logging {
}
}
- val relationFlowDetails = flow.getRelationFlowDetails
- graphElementRegistry.registerFlow(
- UnresolvedFlow(
- identifier = flowIdentifier,
- destinationIdentifier = destinationIdentifier,
- func = FlowAnalysis.createFlowFunctionFromLogicalPlan(
- transformRelationFunc(relationFlowDetails.getRelation)),
- sqlConf = flow.getSqlConfMap.asScala.toMap,
- once = false,
- queryContext = QueryContext(Option(defaultCatalog),
Option(defaultDatabase)),
- origin = QueryOrigin(
- filePath = Option.when(flow.getSourceCodeLocation.hasFileName)(
- flow.getSourceCodeLocation.getFileName),
- line = Option.when(flow.getSourceCodeLocation.hasLineNumber)(
- flow.getSourceCodeLocation.getLineNumber),
- objectType = Some(QueryOriginType.Flow.toString),
- objectName = Option(flowIdentifier.unquotedString),
- language = Some(Python()))))
+ flow.getDetailsCase match {
+ case proto.PipelineCommand.DefineFlow.DetailsCase.RELATION_FLOW_DETAILS
=>
+ val relationFlowDetails = flow.getRelationFlowDetails
+ graphElementRegistry.registerFlow(
+ UnresolvedFlow(
+ identifier = flowIdentifier,
+ destinationIdentifier = destinationIdentifier,
+ func = FlowAnalysis.createFlowFunctionFromLogicalPlan(
+ transformRelationFunc(relationFlowDetails.getRelation)),
+ sqlConf = flow.getSqlConfMap.asScala.toMap,
+ once = false,
+ queryContext = QueryContext(Option(defaultCatalog),
Option(defaultDatabase)),
+ origin = QueryOrigin(
+ filePath = Option.when(flow.getSourceCodeLocation.hasFileName)(
+ flow.getSourceCodeLocation.getFileName),
+ line = Option.when(flow.getSourceCodeLocation.hasLineNumber)(
+ flow.getSourceCodeLocation.getLineNumber),
+ objectType = Some(QueryOriginType.Flow.toString),
+ objectName = Option(flowIdentifier.unquotedString),
+ language = Some(Python()))))
+ case proto.PipelineCommand.DefineFlow.DetailsCase.AUTO_CDC_FLOW_DETAILS
=>
+ throw new UnsupportedOperationException("AutoCdcFlowDetails is not yet
implemented.")
Review Comment:
this will be implemented as soon as the internal dataflow graph classes are
merged.
--
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]