Skip to content

Commit

Permalink
fix: happy clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
iajoiner committed Nov 7, 2024
1 parent a2ce853 commit 3300c8b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions crates/proof-of-sql-parser/src/sqlparser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use crate::{
OrderBy as PoSqlOrderBy, OrderByDirection, SelectResultExpr, SetExpression,
TableExpression, UnaryOperator as PoSqlUnaryOperator,
},
posql_time::PoSQLTimeUnit,
Identifier, ResourceId, SelectStatement,
};
use alloc::{boxed::Box, string::ToString, vec};
Expand Down Expand Up @@ -72,10 +71,12 @@ impl From<Literal> for Expr {
Literal::Decimal(n) => Expr::Value(Value::Number(n.to_string(), false)),
Literal::Boolean(b) => Expr::Value(Value::Boolean(b)),
Literal::Timestamp(timestamp) => {
let timeunit = timestamp.timeunit();
// We currently exclusively store timestamps in UTC.
Expr::TypedString {
data_type: DataType::Timestamp(Some(timeunit.into()), TimezoneInfo::None),
data_type: DataType::Timestamp(
Some(timestamp.timeunit().into()),
TimezoneInfo::None,
),
value: timestamp.timestamp().to_string(),
}
}
Expand Down

0 comments on commit 3300c8b

Please sign in to comment.