Skip to content

Commit 2cd5365

Browse files
belieferLuciferYang
authored andcommitted
[SPARK-42746][SQL][FOLLOWUP] Improve the golden files by print the hex string of binary
### What changes were proposed in this pull request? This PR propose to improve the golden files by print the hex string of binary ### Why are the changes needed? Based on the discussion at https://github.com/apache/spark/pull/48748/files#r1852083414. We should make the output of golden tests more clear. ### Does this PR introduce _any_ user-facing change? 'No'. New feature. ### How was this patch tested? GA ### Was this patch authored or co-authored using generative AI tooling? 'No'. Closes #49889 from beliefer/SPARK-42746_followup. Authored-by: beliefer <[email protected]> Signed-off-by: yangjie01 <[email protected]>
1 parent 274dc5e commit 2cd5365

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

sql/core/src/test/resources/sql-tests/inputs/listagg.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
--SET spark.sql.binaryOutputStyle=HEX
2+
13
-- Create temporary views
24
CREATE TEMP VIEW df AS
35
SELECT * FROM (VALUES ('a', 'b'), ('a', 'c'), ('b', 'c'), ('b', 'd'), (NULL, NULL)) AS t(a, b);

sql/core/src/test/resources/sql-tests/results/listagg.sql.out

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,23 +154,23 @@ SELECT listagg(c1) FROM (VALUES (X'DEAD'), (X'BEEF')) AS t(c1)
154154
-- !query schema
155155
struct<listagg(c1, NULL):binary>
156156
-- !query output
157-
ޭ��
157+
DEADBEEF
158158

159159

160160
-- !query
161161
SELECT listagg(c1, NULL) FROM (VALUES (X'DEAD'), (X'BEEF')) AS t(c1)
162162
-- !query schema
163163
struct<listagg(c1, NULL):binary>
164164
-- !query output
165-
ޭ��
165+
DEADBEEF
166166

167167

168168
-- !query
169169
SELECT listagg(c1, X'42') FROM (VALUES (X'DEAD'), (X'BEEF')) AS t(c1)
170170
-- !query schema
171171
struct<listagg(c1, X'42'):binary>
172172
-- !query output
173-
ޭB��
173+
DEAD42BEEF
174174

175175

176176
-- !query

0 commit comments

Comments
 (0)