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 @@ -1040,6 +1040,7 @@ define_keywords!(
10401040 TRANSLATE_REGEX ,
10411041 TRANSLATION ,
10421042 TREAT ,
1043+ TREE ,
10431044 TRIGGER ,
10441045 TRIM ,
10451046 TRIM_ARRAY ,
Original file line number Diff line number Diff line change @@ -6006,6 +6006,7 @@ impl<'a> Parser<'a> {
60066006 Keyword::TEXT => Ok(AnalyzeFormat::TEXT),
60076007 Keyword::GRAPHVIZ => Ok(AnalyzeFormat::GRAPHVIZ),
60086008 Keyword::JSON => Ok(AnalyzeFormat::JSON),
6009+ Keyword::TREE => Ok(AnalyzeFormat::TREE),
60096010 _ => self.expected("fileformat", next_token),
60106011 },
60116012 _ => self.expected("fileformat", next_token),
Original file line number Diff line number Diff line change @@ -5442,6 +5442,42 @@ fn parse_explain_analyze_with_simple_select() {
54425442 Some(AnalyzeFormatKind::Keyword(AnalyzeFormat::TEXT)),
54435443 None,
54445444 );
5445+
5446+ run_explain_analyze(
5447+ all_dialects(),
5448+ "EXPLAIN FORMAT=TEXT SELECT sqrt(id) FROM foo",
5449+ false,
5450+ false,
5451+ Some(AnalyzeFormatKind::Assignment(AnalyzeFormat::TEXT)),
5452+ None,
5453+ );
5454+
5455+ run_explain_analyze(
5456+ all_dialects(),
5457+ "EXPLAIN FORMAT=GRAPHVIZ SELECT sqrt(id) FROM foo",
5458+ false,
5459+ false,
5460+ Some(AnalyzeFormatKind::Assignment(AnalyzeFormat::GRAPHVIZ)),
5461+ None,
5462+ );
5463+
5464+ run_explain_analyze(
5465+ all_dialects(),
5466+ "EXPLAIN FORMAT=JSON SELECT sqrt(id) FROM foo",
5467+ false,
5468+ false,
5469+ Some(AnalyzeFormatKind::Assignment(AnalyzeFormat::JSON)),
5470+ None,
5471+ );
5472+
5473+ run_explain_analyze(
5474+ all_dialects(),
5475+ "EXPLAIN FORMAT=TREE SELECT sqrt(id) FROM foo",
5476+ false,
5477+ false,
5478+ Some(AnalyzeFormatKind::Assignment(AnalyzeFormat::TREE)),
5479+ None,
5480+ );
54455481}
54465482
54475483#[test]
You can’t perform that action at this time.
0 commit comments