Generates appropriate projection expression for empty projection lists. Returns an empty vec for dialects supporting empty select lists, or a dummy literal `1` for other dialects.
(&self)
| 2017 | /// Returns an empty vec for dialects supporting empty select lists, |
| 2018 | /// or a dummy literal `1` for other dialects. |
| 2019 | fn empty_projection_fallback(&self) -> Vec<Expr> { |
| 2020 | if self.dialect.supports_empty_select_list() { |
| 2021 | Vec::new() |
| 2022 | } else { |
| 2023 | vec![Expr::Literal(ScalarValue::Int64(Some(1)), None)] |
| 2024 | } |
| 2025 | } |
| 2026 | |
| 2027 | /// Decides where extracted table-scan filters belong in the unparsed SQL: |
| 2028 | /// in the `JOIN ON` clause or in `WHERE`. |
no test coverage detected