Skip to content

Commit

Permalink
adapt parse test for Snowflake edge case - there Integer type is repl…
Browse files Browse the repository at this point in the history
…aced by Decimal
  • Loading branch information
radeusgd committed Jan 20, 2025
1 parent 1625112 commit 1c0ce51
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -567,8 +567,15 @@ add_conversion_specs suite_builder setup =
setup.expect_integer_type c2
c2.to_vector . should_equal v

# Testing that `parse` on a column that already has the right type also works (no-op).
t2 = table_builder [["X", v]]
c3 = t2.parse ["X"] Value_Type.Integer . at "X"
## On most backends, existing_type will be Integer,
but e.g. on Snowflake it will be Decimal, so to make this test universal
we need to set the actual type as target for parse.
existing_type = t2.at "X" . value_type
setup.expect_integer_type existing_type

c3 = t2.parse ["X"] existing_type . at "X"
setup.expect_integer_type c3
c3.to_vector . should_equal v

Expand Down

0 comments on commit 1c0ce51

Please sign in to comment.