mirror of
https://github.com/lancedb/lancedb.git
synced 2026-07-12 23:40:40 +00:00
chore: update lance dependency to v9.0.0-beta.17 (#3627)
Updates Lance Rust workspace dependencies and Java lance-core to v9.0.0-beta.17. Includes the required PyO3 compatibility fix for the newer dependency set. Triggering Lance tag: https://github.com/lance-format/lance/releases/tag/v9.0.0-beta.17 --------- Co-authored-by: Jack Ye <yezhaoqin@gmail.com>
This commit is contained in:
@@ -191,7 +191,7 @@ pub fn expr_lit(value: Bound<'_, PyAny>) -> PyResult<PyExpr> {
|
||||
}
|
||||
|
||||
// datetime.datetime is a subclass of datetime.date, so it must be checked first.
|
||||
if let Ok(dt) = value.downcast::<PyDateTime>() {
|
||||
if let Ok(dt) = value.cast::<PyDateTime>() {
|
||||
let ts: f64 = dt.call_method0("timestamp")?.extract()?;
|
||||
let micros = (ts * 1_000_000.0).round() as i64;
|
||||
return Ok(PyExpr(df_lit(ScalarValue::TimestampMicrosecond(
|
||||
@@ -199,7 +199,7 @@ pub fn expr_lit(value: Bound<'_, PyAny>) -> PyResult<PyExpr> {
|
||||
None,
|
||||
))));
|
||||
}
|
||||
if let Ok(d) = value.downcast::<PyDate>() {
|
||||
if let Ok(d) = value.cast::<PyDate>() {
|
||||
let ordinal: i32 = d.call_method0("toordinal")?.extract()?;
|
||||
let days = ordinal - 719163; // Unix epoch is 1970-01-01
|
||||
return Ok(PyExpr(df_lit(ScalarValue::Date32(Some(days)))));
|
||||
|
||||
Reference in New Issue
Block a user