dtenedor commented on PR #60367:
URL: https://github.com/apache/spark/pull/60367#issuecomment-6898879198

   Thanks for the third round. All eight findings are addressed in the new 
commit, and each inline thread has a reply with what changed. The five branches 
listed as untested now each have a case that fails when the branch is removed:
   
   - `SELECT named_struct('x', 1) AS s FROM VALUES (1, 2) AS s(k, y) GROUP BY k 
HAVING s.y? IS NULL` returns the row (the top-level `markTried` site), in 
`OptionalReferencesSuite` with the fixed-point analyzer alone rather than in 
the golden file: the single-pass resolver fails this shape with 
`UNRESOLVED_COLUMN` for `s.y` with or without `?`, and even when the alias `s` 
has the field `y` (`SELECT named_struct('y', 1) AS s FROM VALUES (1, 2) AS s(k, 
y) GROUP BY k HAVING s.y IS NULL` resolves to the alias field in the 
fixed-point analyzer and fails in the single-pass one). That gap is independent 
of this PR; I checked the statement without `?` on master as well. The test 
says so in a comment.
   - `SqlStatementSplitterSuite`: `BEGIN SELECT a? FROM t; SELECT 1; END; 
SELECT 2;` is two statements with the conf on and is split at every `;` with it 
off.
   - `DECLARE OR REPLACE VARIABLE void_var DEFAULT NULL; SELECT void_var.a?` 
fails like `SELECT void_var.a` (`voidBaseIsNull = false` for variables).
   - `SELECT known_struct.b?, b + 1` fails with `UNRESOLVED_COLUMN` for `b` 
(the implicit alias of a variable's missing field).
   - `ParametersSuite`, legacy binding mode: `WITH c AS (SELECT first(DISTINCT 
?) AS f, missing? AS m FROM v) SELECT f, ? AS g FROM c` and the same CTE inside 
a scalar subquery fail with `UNUSED_SQL_PARAMETER_VALUES` for two values, 
through `spark.sql(text, args)` and `EXECUTE IMMEDIATE ... USING` (the 
`innerChildren` branch of `hasOptionalReferences`).
   
   On CALL arguments I kept `?` allowed and explained the reasoning in the 
thread on `OptionalReferenceValidation` and in the validator doc; the two-line 
change to reject it is described there if a committer prefers the stricter side.
   


-- 
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]

Reply via email to