Skip to content

Commit

Permalink
Allow tz conversion using any string type
Browse files Browse the repository at this point in the history
Co-authored-by: David Peter <sharkdp@users.noreply.github.com>
  • Loading branch information
eminence and sharkdp committed Feb 9, 2024
1 parent d8bcf07 commit 83be237
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion numbat/src/typechecker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ impl TypeChecker {
let rhs_is_datetime = rhs_checked.get_type() == Type::DateTime;

if *op == BinaryOperator::ConvertTo
&& matches!(rhs_checked, typed_ast::Expression::String(..))
&& rhs_checked.get_type() == Type::String
{
// Supports timezone conversion
typed_ast::Expression::BinaryOperatorForDate(
Expand Down

0 comments on commit 83be237

Please sign in to comment.