Skip to content

Commit bcf26a8

Browse files
committed
fix result
1 parent 87c588f commit bcf26a8

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

src/query/ast/src/ast/format/syntax/expr.rs

+11-4
Original file line numberDiff line numberDiff line change
@@ -329,24 +329,31 @@ pub(crate) fn pretty_expr(expr: Expr) -> RcDoc<'static> {
329329
res.clone()
330330
.append(RcDoc::text(","))
331331
.append(RcDoc::space())
332-
.append(RcDoc::text("ASC"));
332+
.append(RcDoc::text("'"))
333+
.append(RcDoc::text("ASC"))
334+
.append(RcDoc::text("'"));
333335
} else {
334336
res.clone()
335337
.append(RcDoc::text(","))
336338
.append(RcDoc::space())
337-
.append(RcDoc::text("DESC"));
339+
.append(RcDoc::text("'"))
340+
.append(RcDoc::text("DESC"))
341+
.append(RcDoc::text("'"));
338342
}
339343
if null_first {
340344
res.clone()
341345
.append(RcDoc::text(","))
342346
.append(RcDoc::space())
347+
.append(RcDoc::text("'"))
343348
.append(RcDoc::text("NULL FIRST"))
344-
.append(RcDoc::space());
349+
.append(RcDoc::text("'"));
345350
} else {
346351
res.clone()
347352
.append(RcDoc::text(","))
348353
.append(RcDoc::space())
349-
.append(RcDoc::text("NULL LAST"));
354+
.append(RcDoc::text("'"))
355+
.append(RcDoc::text("NULL LAST"))
356+
.append(RcDoc::text("'"));
350357
}
351358
res.clone().append(RcDoc::text(")"))
352359
}

tests/sqllogictests/suites/base/05_ddl/05_0026_ddl_unset_settings

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ query TTTT
33
SELECT name, value, default, level from system.settings where name in ('sql_dialect', 'timezone', 'wait_for_async_insert_timeout')
44
----
55
sql_dialect PostgreSQL PostgreSQL SESSION
6-
timezone UTC UTC SESSION
7-
wait_for_async_insert_timeout 100 100 SESSION
6+
timezone UTC UTC SESSION
7+
wait_for_async_insert_timeout 100 100 SESSION
88

99
skipif clickhouse
1010
statement ok

0 commit comments

Comments
 (0)