File tree Expand file tree Collapse file tree 3 files changed +38
-0
lines changed
Expand file tree Collapse file tree 3 files changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -1038,6 +1038,7 @@ define_keywords!(
10381038 TRANSLATE_REGEX ,
10391039 TRANSLATION ,
10401040 TREAT ,
1041+ TREE ,
10411042 TRIGGER ,
10421043 TRIM ,
10431044 TRIM_ARRAY ,
Original file line number Diff line number Diff line change @@ -5975,6 +5975,7 @@ impl<'a> Parser<'a> {
59755975 Keyword::TEXT => Ok(AnalyzeFormat::TEXT),
59765976 Keyword::GRAPHVIZ => Ok(AnalyzeFormat::GRAPHVIZ),
59775977 Keyword::JSON => Ok(AnalyzeFormat::JSON),
5978+ Keyword::TREE => Ok(AnalyzeFormat::TREE),
59785979 _ => self.expected("fileformat", next_token),
59795980 },
59805981 _ => self.expected("fileformat", next_token),
Original file line number Diff line number Diff line change @@ -5419,6 +5419,42 @@ fn parse_explain_analyze_with_simple_select() {
54195419 Some(AnalyzeFormatKind::Keyword(AnalyzeFormat::TEXT)),
54205420 None,
54215421 );
5422+
5423+ run_explain_analyze(
5424+ all_dialects(),
5425+ "EXPLAIN FORMAT=TEXT SELECT sqrt(id) FROM foo",
5426+ false,
5427+ false,
5428+ Some(AnalyzeFormatKind::Assignment(AnalyzeFormat::TEXT)),
5429+ None,
5430+ );
5431+
5432+ run_explain_analyze(
5433+ all_dialects(),
5434+ "EXPLAIN FORMAT=GRAPHVIZ SELECT sqrt(id) FROM foo",
5435+ false,
5436+ false,
5437+ Some(AnalyzeFormatKind::Assignment(AnalyzeFormat::GRAPHVIZ)),
5438+ None,
5439+ );
5440+
5441+ run_explain_analyze(
5442+ all_dialects(),
5443+ "EXPLAIN FORMAT=JSON SELECT sqrt(id) FROM foo",
5444+ false,
5445+ false,
5446+ Some(AnalyzeFormatKind::Assignment(AnalyzeFormat::JSON)),
5447+ None,
5448+ );
5449+
5450+ run_explain_analyze(
5451+ all_dialects(),
5452+ "EXPLAIN FORMAT=TREE SELECT sqrt(id) FROM foo",
5453+ false,
5454+ false,
5455+ Some(AnalyzeFormatKind::Assignment(AnalyzeFormat::TREE)),
5456+ None,
5457+ );
54225458}
54235459
54245460#[test]
You can’t perform that action at this time.
0 commit comments