johannes-ehls-db commented on code in PR #60719:
URL: https://github.com/apache/spark/pull/60719#discussion_r4640460824


##########
sql/core/src/test/resources/sql-tests/inputs/subquery/scalar-subquery/scalar-subquery-select.sql:
##########
@@ -343,3 +343,39 @@ SELECT (SELECT t1.* FROM (SELECT 3 AS col1) AS t1 LIMIT 1) 
FROM VALUES(1) AS t1(
 
 -- Outer star expansion through a derived table wrapper
 SELECT (SELECT * FROM (SELECT t1.* FROM VALUES(2) AS t2(col1) LIMIT 1)) FROM 
VALUES(1) AS t1(col1);
+
+-- Functions rewritten into an expression that references an argument more 
than once (nullif,
+-- between, decode) over scalar subqueries, aggregates, windows and lambdas.
+set spark.sql.alwaysInlineCommonExpr=true;
+
+-- expected 3
+select nullif((select max(id) from range(1, 4)), 0);

Review Comment:
   Switched the three cases to an inline VALUES table so they run under the 
dual run. Done in `c4bcfc8c42c`.



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