(expr: &ast::Expr)
| 125 | } |
| 126 | |
| 127 | fn extract_col_ref(expr: &ast::Expr) -> Option<String> { |
| 128 | match expr { |
| 129 | ast::Expr::Identifier(ident) => Some(normalize_ident(ident)), |
| 130 | // Two-part: table.column — preserve the qualified form as the join key. |
| 131 | ast::Expr::CompoundIdentifier(parts) if parts.len() == 2 => Some(format!( |
| 132 | "{}.{}", |
| 133 | normalize_ident(&parts[0]), |
| 134 | normalize_ident(&parts[1]) |
| 135 | )), |
| 136 | // Three or more parts: schema.table.column — reject by returning None; |
| 137 | // the caller will push the expression into non_equi which convert_expr |
| 138 | // then rejects with SqlError::Unsupported. |
| 139 | ast::Expr::CompoundIdentifier(_) => None, |
| 140 | _ => None, |
| 141 | } |
| 142 | } |
no test coverage detected