Skip to main content

gluesql_core/planner/
error.rs

1use {serde::Serialize, std::fmt::Debug, thiserror::Error as ThisError};
2
3#[derive(ThisError, Serialize, Debug, PartialEq, Eq)]
4pub enum PlannerError {
5    /// Error that that omits when user projects common column name from multiple tables in `JOIN`
6    /// situation.
7    #[error("column reference {0} is ambiguous, please specify the table name")]
8    ColumnReferenceAmbiguous(String),
9
10    #[error(
11        "SELECT * is not allowed for joins mixing schemaful and schemaless tables; use qualified wildcard or explicit columns"
12    )]
13    SchemalessMixedJoinWildcardProjection,
14
15    #[error("specifying columns is not allowed for schemaless table INSERT; omit the column list")]
16    SchemalessInsertWithExplicitColumns,
17
18    #[error("unreachable")]
19    Unreachable,
20}