yaooqinn commented on a change in pull request #28402:
URL: https://github.com/apache/spark/pull/28402#discussion_r417722433
##########
File path: sql/core/src/test/resources/sql-tests/results/ansi/interval.sql.out
##########
@@ -689,7 +689,7 @@ select
interval '2-2' year to month + dateval
from interval_arithmetic
-- !query schema
-struct<dateval:date,dateval + (- INTERVAL '2 years 2 months'):date,dateval +
(- INTERVAL '-2 years -2 months'):date,dateval + INTERVAL '2 years 2
months':date,dateval + INTERVAL '-2 years -2 months':date,dateval + (- INTERVAL
'2 years 2 months'):date,dateval + INTERVAL '2 years 2 months':date>
+struct<dateval:date,interval_arithmetic.`dateval` - INTERVAL '2 years 2
months':date,interval_arithmetic.`dateval` - INTERVAL '-2 years -2
months':date,dateval + INTERVAL '2 years 2 months':date,dateval + INTERVAL '-2
years -2 months':date,dateval + (- INTERVAL '2 years 2 months'):date,dateval +
INTERVAL '2 years 2 months':date>
Review comment:
This is because this expression is being runtime replaced, so the
`AttiributeReference`s here are not getting the chance to become a
`PettyAttribute` to not print a debug style string.
You can take a look at the `Extract` expression which is newly added by you
as an example,
https://github.com/apache/spark/blob/ea525fe8c0cc6336a7ba8d98bada3198795f8aed/sql/core/src/test/resources/sql-tests/results/extract.sql.out#L1
If we are going to make pretty strings for `RuntimeReplaceable` expressions,
I think we should do this for them all in separate PR explicitly. WDYT?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]