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 491dc7c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions numbat/src/typechecker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -506,9 +506,7 @@ impl TypeChecker {
.unwrap_or(false);
let rhs_is_datetime = rhs_checked.get_type() == Type::DateTime;

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

0 comments on commit 491dc7c

Please sign in to comment.