Skip to content

Commit

Permalink
finish rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-beedie committed Sep 6, 2024
1 parent a69faf3 commit 6cb4788
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crates/polars-sql/src/sql_expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ impl SQLExprVisitor<'_> {
if dtype == &SQLDataType::JSON {
return Ok(expr.str().json_decode(None, None));
}
let polars_type = map_sql_dtype_to_polars(data_type)?;
let polars_type = map_sql_dtype_to_polars(dtype)?;
Ok(match cast_kind {
CastKind::Cast | CastKind::DoubleColon => expr.strict_cast(polars_type),
CastKind::TryCast | CastKind::SafeCast => expr.cast(polars_type),
Expand Down
6 changes: 3 additions & 3 deletions crates/polars-sql/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ fn timeunit_from_precision(prec: &Option<u64>) -> PolarsResult<TimeUnit> {
})
}

pub(crate) fn map_sql_dtype_to_polars(data_type: &SQLDataType) -> PolarsResult<DataType> {
Ok(match data_type {
pub(crate) fn map_sql_dtype_to_polars(dtype: &SQLDataType) -> PolarsResult<DataType> {
Ok(match dtype {
// ---------------------------------
// array/list
// ---------------------------------
Expand Down Expand Up @@ -202,7 +202,7 @@ pub(crate) fn map_sql_dtype_to_polars(data_type: &SQLDataType) -> PolarsResult<D
},
},
_ => {
polars_bail!(SQLInterface: "datatype {:?} is not currently supported", data_type)
polars_bail!(SQLInterface: "datatype {:?} is not currently supported", dtype)
},
})
}

0 comments on commit 6cb4788

Please sign in to comment.