Skip to content

Commit d7cbbf2

Browse files
committed
Fixes
1 parent 330de88 commit d7cbbf2

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/ast/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4494,7 +4494,7 @@ impl fmt::Display for Statement {
44944494
}
44954495

44964496
if let Some(format) = format {
4497-
write!(f, " {format} ")?;
4497+
write!(f, "{format} ")?;
44984498
}
44994499

45004500
if let Some(options) = options {
@@ -7646,7 +7646,7 @@ impl fmt::Display for DuplicateTreatment {
76467646
#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
76477647
pub enum AnalyzeFormatKind {
76487648
Keyword(AnalyzeFormat),
7649-
Assignment(AnalyzeFormat)
7649+
Assignment(AnalyzeFormat),
76507650
}
76517651

76527652
impl fmt::Display for AnalyzeFormatKind {
@@ -7666,7 +7666,7 @@ pub enum AnalyzeFormat {
76667666
GRAPHVIZ,
76677667
JSON,
76687668
TRADITIONAL,
7669-
TREE
7669+
TREE,
76707670
}
76717671

76727672
impl fmt::Display for AnalyzeFormat {

tests/sqlparser_common.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5161,7 +5161,7 @@ fn run_explain_analyze(
51615161
query: &str,
51625162
expected_verbose: bool,
51635163
expected_analyze: bool,
5164-
expected_format: Option<AnalyzeFormat>,
5164+
expected_format: Option<AnalyzeFormatKind>,
51655165
expected_options: Option<Vec<UtilityOption>>,
51665166
) {
51675167
match dialect.verified_stmt(query) {
@@ -5272,7 +5272,7 @@ fn parse_explain_analyze_with_simple_select() {
52725272
"EXPLAIN ANALYZE FORMAT GRAPHVIZ SELECT sqrt(id) FROM foo",
52735273
false,
52745274
true,
5275-
Some(AnalyzeFormat::GRAPHVIZ),
5275+
Some(AnalyzeFormatKind::Keyword(AnalyzeFormat::GRAPHVIZ)),
52765276
None,
52775277
);
52785278

@@ -5281,7 +5281,7 @@ fn parse_explain_analyze_with_simple_select() {
52815281
"EXPLAIN ANALYZE VERBOSE FORMAT JSON SELECT sqrt(id) FROM foo",
52825282
true,
52835283
true,
5284-
Some(AnalyzeFormat::JSON),
5284+
Some(AnalyzeFormatKind::Keyword(AnalyzeFormat::JSON)),
52855285
None,
52865286
);
52875287

@@ -5290,7 +5290,7 @@ fn parse_explain_analyze_with_simple_select() {
52905290
"EXPLAIN ANALYZE VERBOSE FORMAT=JSON SELECT sqrt(id) FROM foo",
52915291
true,
52925292
true,
5293-
Some(AnalyzeFormat::JSON),
5293+
Some(AnalyzeFormatKind::Assignment(AnalyzeFormat::JSON)),
52945294
None,
52955295
);
52965296

@@ -5299,7 +5299,7 @@ fn parse_explain_analyze_with_simple_select() {
52995299
"EXPLAIN VERBOSE FORMAT TEXT SELECT sqrt(id) FROM foo",
53005300
true,
53015301
false,
5302-
Some(AnalyzeFormat::TEXT),
5302+
Some(AnalyzeFormatKind::Keyword(AnalyzeFormat::TEXT)),
53035303
None,
53045304
);
53055305
}

0 commit comments

Comments
 (0)