szehon-ho commented on code in PR #60560:
URL: https://github.com/apache/spark/pull/60560#discussion_r4606038282
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/AssignmentUtils.scala:
##########
@@ -61,27 +61,34 @@ object AssignmentUtils extends SQLConfHelper with
CastSupport {
* @param ansiStoreAssignmentCastCheck when the ANSI store-assignment cast
check runs:
* ANALYSIS (default) rejects an unsafe
cast at analysis
* time; RUNTIME rejects invalid values
at execution time.
+ * @param generatedColumns top-level column names whose omitted values must
be generated
Review Comment:
Updated both alignment methods and the placeholder Scaladoc to describe
omitted generated-value placeholders and the required resolution step. The
parameter docs now describe `generatedColumns` as the target table's
generated-column names.
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TableConstraintResolution.scala:
##########
@@ -111,11 +112,19 @@ private[sql] class TableConstraintResolution(
s"${col.name} <=> $genExprSql")
// Analyze the check under the settings an auto-filled value is
analyzed under, so that a
// row Spark auto-filled passes it when a later write carries it.
- reader.analyze(
+ val invariant = reader.analyze(
check(catalystExpr),
check(reader.toCatalyst(StoredExpressionText.parseWithSessionAnsi)),
v2Write.query.output,
analyze)
+ v2Write match {
Review Comment:
Updated the Scaladoc to describe INSERT auto-fill and UPDATE/MERGE
validation. Checks now skip delta deletes and rows copied unchanged by
group-based writes; updated and inserted rows remain validated. Added a
migration note and a time-zone regression for copied rows.
--
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]