File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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 @@ -6037,6 +6037,7 @@ impl<'a> Parser<'a> {
60376037 Keyword::TEXT => Ok(AnalyzeFormat::TEXT),
60386038 Keyword::GRAPHVIZ => Ok(AnalyzeFormat::GRAPHVIZ),
60396039 Keyword::JSON => Ok(AnalyzeFormat::JSON),
6040+ Keyword::TREE => Ok(AnalyzeFormat::TREE),
60406041 _ => self.expected("fileformat", next_token),
60416042 },
60426043 _ => self.expected("fileformat", next_token),
Original file line number Diff line number Diff line change @@ -5443,6 +5443,42 @@ fn parse_explain_analyze_with_simple_select() {
54435443 Some(AnalyzeFormatKind::Keyword(AnalyzeFormat::TEXT)),
54445444 None,
54455445 );
5446+
5447+ run_explain_analyze(
5448+ all_dialects(),
5449+ "EXPLAIN FORMAT=TEXT SELECT sqrt(id) FROM foo",
5450+ false,
5451+ false,
5452+ Some(AnalyzeFormatKind::Assignment(AnalyzeFormat::TEXT)),
5453+ None,
5454+ );
5455+
5456+ run_explain_analyze(
5457+ all_dialects(),
5458+ "EXPLAIN FORMAT=GRAPHVIZ SELECT sqrt(id) FROM foo",
5459+ false,
5460+ false,
5461+ Some(AnalyzeFormatKind::Assignment(AnalyzeFormat::GRAPHVIZ)),
5462+ None,
5463+ );
5464+
5465+ run_explain_analyze(
5466+ all_dialects(),
5467+ "EXPLAIN FORMAT=JSON SELECT sqrt(id) FROM foo",
5468+ false,
5469+ false,
5470+ Some(AnalyzeFormatKind::Assignment(AnalyzeFormat::JSON)),
5471+ None,
5472+ );
5473+
5474+ run_explain_analyze(
5475+ all_dialects(),
5476+ "EXPLAIN FORMAT=TREE SELECT sqrt(id) FROM foo",
5477+ false,
5478+ false,
5479+ Some(AnalyzeFormatKind::Assignment(AnalyzeFormat::TREE)),
5480+ None,
5481+ );
54465482}
54475483
54485484#[test]
You can’t perform that action at this time.
0 commit comments