risingwave_frontend::handler::create_mv

Function get_column_names

source
pub(super) fn get_column_names(
    bound: &BoundQuery,
    session: &SessionImpl,
    columns: Vec<Ident>,
) -> Result<Option<Vec<String>>, RwError>
Expand description

If columns is empty, it means that the user did not specify the column names. In this case, we extract the column names from the query. If columns is not empty, it means that user specify the column names and the user should guarantee that the column names number are consistent with the query.