HeartSaVioR commented on code in PR #60068:
URL: https://github.com/apache/spark/pull/60068#discussion_r4609341888
##########
sql/core/src/main/scala/org/apache/spark/sql/classic/StreamingQueryManager.scala:
##########
@@ -285,12 +285,15 @@ class StreamingQueryManager private[sql] (
catalogTable)
// Unsupported-operation checks run during this initial analysis, before
the normal offset-log
- // configuration restoration. Read the compatibility value early for
existing queries that
- // contain a streaming EXCEPT so that upgrading does not change whether
the query is accepted.
+ // configuration restoration. Read compatibility values early when they
affect analysis.
def hasExceptWithStreamingLeft: Boolean = analyzedPlan.exists {
case Except(left, _, _) if left.isStreaming => true
case _ => false
}
+ def hasStatefulJoin: Boolean = analyzedPlan.exists {
Review Comment:
> [!NOTE]
> **DISCLAIMER:** This comment was written by an LLM: GPT-6.1 Sol
(`gpt-6-1-sol`, xhigh effort), running as an SP2K agent on behalf of
@HeartSaVioR.
Addressed in `20611101e65`. The join-specific initial-analysis restoration
is removed, while the existing streaming-EXCEPT handling is preserved. Thanks.
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/runtime/MicroBatchExecution.scala:
##########
@@ -212,6 +212,15 @@ class MicroBatchExecution(
assert(queryExecutionThread eq Thread.currentThread,
"logicalPlan must be initialized in QueryExecutionThread " +
s"but the current thread was ${Thread.currentThread}")
+ val streamConf = sparkSessionForStream.sessionState.conf
+ initialLatestOffsetSeq.foreach { case (_, offsets) =>
Review Comment:
> [!NOTE]
> **DISCLAIMER:** This comment was written by an LLM: GPT-6.1 Sol
(`gpt-6-1-sol`, xhigh effort), running as an SP2K agent on behalf of
@HeartSaVioR.
Addressed in `20611101e65`. The extra early runtime restoration is removed;
the existing offset-metadata paths still restore the pinned setting for startup
optimization and resumed batches. Thanks.
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala:
##########
@@ -1514,8 +1514,32 @@ object PushProjectionThroughUnion extends
Rule[LogicalPlan] {
*/
object ColumnPruning extends Rule[LogicalPlan] {
- def apply(plan: LogicalPlan): LogicalPlan = removeProjectBeforeFilter(
- plan.transformWithPruning(AlwaysProcess.fn, ruleId) {
+ def apply(plan: LogicalPlan): LogicalPlan = {
+ val retainJoinEventTime =
Review Comment:
> [!NOTE]
> **DISCLAIMER:** This comment was written by an LLM: GPT-6.1 Sol
(`gpt-6-1-sol`, xhigh effort), running as an SP2K agent on behalf of
@HeartSaVioR.
Addressed in `20611101e65`. The optimizer comment now explicitly warns that
changing eligibility, including through earlier optimizer rules, requires a
separately pinned mode or state migration. Thanks.
--
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]