naveenp2708 commented on PR #60009: URL: https://github.com/apache/spark/pull/60009#issuecomment-6815628481
Thanks for the detailed review @peter-toth . All three are addressed. Finding 1: scoped the canonical flag so a non-bucketed scan drops it (two such scans stay sameResult across a config flip) and a bucketed scan keeps it. One change from your suggestion: bucketingEnabled && relation.bucketSpec.isDefined in doCanonicalize threw an NPE on a (de)serialized scan, since relation is @transient and null there (SparkPlanSuite SPARK-23731 and SPARK-37779). I froze whether the relation is bucketed into an isBucketedRelation field at planning and scope with that instead, so the canonical form keeps the same semantics and stays stable across (de)serialization. Added the fact/dimA/dimB DPP query as a test, plus a sameResult test that pins both directions. Finding 2: DisableUnnecessaryBucketedScan now gates on !hasBucketedScan instead of the live config. Added a test that plans a bucketed scan and prepares it with bucketing off, under both AQE on and off, and checks the rule disables it. Finding 3: FileSourceStrategy now passes bucketingEnabled explicitly and the default is dropped, so it can’t be omitted. The source is the querying session (SQLConf.get), matching EnsureRequirements and DisableUnnecessaryBucketedScan. Called out the session-source behavior change in the description. -- 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]
