Skip to content

Commit

Permalink
workaround for #10412
Browse files Browse the repository at this point in the history
  • Loading branch information
radeusgd committed Jul 4, 2024
1 parent d18cf7f commit f161495
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/Snowflake_Tests/src/Snowflake_Spec.enso
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ add_snowflake_specs suite_builder create_connection_fn db_name =
Common_Spec.add_specs suite_builder prefix create_connection_fn

common_selection = Common_Table_Operations.Main.Test_Selection.Config supports_case_sensitive_columns=True order_by_unicode_normalization_by_default=True allows_mixed_type_comparisons=False fixed_length_text_columns=True removes_trailing_whitespace_casting_from_char_to_varchar=True supports_decimal_type=True supported_replace_params=supported_replace_params run_advanced_edge_case_tests_by_default=False
aggregate_selection = Common_Table_Operations.Aggregate_Spec.Test_Selection.Config first_last=False first_last_row_order=False aggregation_problems=False
aggregate_selection = Common_Table_Operations.Aggregate_Spec.Test_Selection.Config first_last=False first_last_row_order=False aggregation_problems=False text_concat=False
agg_in_memory_table = ((Project_Description.new enso_dev.Table_Tests).data / "data.csv") . read

agg_table_fn = _->
Expand Down
16 changes: 15 additions & 1 deletion test/Table_Tests/src/Common_Table_Operations/Aggregate_Spec.enso
Original file line number Diff line number Diff line change
Expand Up @@ -908,6 +908,20 @@ add_specs suite_builder setup =
materialized.columns.at 1 . name . should_equal "Shortest B"
materialized.columns.at 1 . to_vector . should_equal ["f"]


# Special case for Snowflake until the https://github.com/enso-org/enso/issues/10412 ticket is resolved.
if setup.prefix.contains "Snowflake" then
suite_builder.group prefix+"Table.aggregate Concatenate" group_builder->
group_builder.specify "should be supported" <|
table = table_builder [["X", ["A", "B", "C"]]]
result = table.aggregate columns=[(Concatenate "X")]
result.row_count . should_equal 1
str = result.at 0 . at 0
# No assumptions about ordering
str . should_contain "A"
str . should_contain "B"
str . should_contain "C"

suite_builder.group prefix+"Table.aggregate Concatenate" (pending = resolve_pending test_selection.text_concat) group_builder->
build_sorted_table table_structure =
# Workaround for https://github.com/enso-org/enso/issues/10321
Expand Down Expand Up @@ -1597,7 +1611,7 @@ add_specs suite_builder setup =
expect_sum_and_unsupported_errors 2 <|
table.aggregate columns=[Sum "X", Shortest "Y", Longest "Y"]

if test_selection.text_concat.not then
if test_selection.text_concat.not && (setup.prefix.contains "Snowflake" . not) then
group_builder.specify "with Concatenate" <|
table = table_builder [["X", [1,2,3]], ["Y", ["a", "bb", "ccc"]]]
expect_sum_and_unsupported_errors 1 <|
Expand Down

0 comments on commit f161495

Please sign in to comment.