Returns true if any `ASTTableExpression` in the query tree carries a `STREAM` modifier.
| 191 | |
| 192 | /// Returns true if any `ASTTableExpression` in the query tree carries a `STREAM` modifier. |
| 193 | bool hasStreamingTableExpression(const DB::IAST & ast) |
| 194 | { |
| 195 | if (const auto * table_expression = ast.as<DB::ASTTableExpression>()) |
| 196 | if (table_expression->stream_settings) |
| 197 | return true; |
| 198 | |
| 199 | for (const auto & child : ast.children) |
| 200 | if (hasStreamingTableExpression(*child)) |
| 201 | return true; |
| 202 | |
| 203 | return false; |
| 204 | } |
| 205 | |
| 206 | void cleanupTempFile(const DB::ASTPtr & parsed_query, const String & tmp_file) |
| 207 | { |