From f1f4033d971f2e7395c9bcf8b9cac3e6f4ccf399 Mon Sep 17 00:00:00 2001 From: Gregory Travis Date: Fri, 25 Oct 2024 14:49:44 -0400 Subject: [PATCH 01/12] attach warning --- .../Base/0.0.0-dev/src/Data/Dictionary.enso | 7 ++++++- .../Base/0.0.0-dev/src/Errors/Common.enso | 19 ++++++++++++++++++- test/Base_Tests/src/Data/Dictionary_Spec.enso | 6 ++++++ 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Dictionary.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Dictionary.enso index f9bccd322f5d..314d32875979 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Dictionary.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Dictionary.enso @@ -1,4 +1,5 @@ import project.Any.Any +import project.Data.Numbers.Float import project.Data.Numbers.Integer import project.Data.Pair.Pair import project.Data.Text.Text @@ -11,8 +12,10 @@ import project.Meta import project.Metadata.Widget import project.Nothing.Nothing import project.Panic.Panic +import project.Warning.Warning from project.Data.Boolean import Boolean, False, True from project.Data.Text.Extensions import all +from project.Errors.Common import Float_Used_As_Dictionary_Key from project.Metadata.Choice import Option from project.Metadata.Widget import Single_Choice, Vector_Editor from project.Widget_Helpers import make_all_selector @@ -165,7 +168,9 @@ type Dictionary key value @value (make_all_selector ..Always) insert : Any -> Any -> Dictionary insert self key=(Missing_Argument.throw "key") value=(Missing_Argument.throw "value") = - self.insert_builtin key value + new_dict = self.insert_builtin key value + if key.is_a Float . not then new_dict else + Warning.attach (Float_Used_As_Dictionary_Key.Warning key) new_dict ## GROUP Selections ICON table_clean diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Errors/Common.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Errors/Common.enso index d1f6f53c3b56..071dac0946cd 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Errors/Common.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Errors/Common.enso @@ -1,3 +1,4 @@ +import project.Data.Numbers.Float import project.Data.Numbers.Integer import project.Data.Text.Extensions import project.Data.Text.Text @@ -551,5 +552,21 @@ type Out_Of_Range ## PRIVATE to_text : Text to_text self = - extra = if self.message.is_nothing then "" else ": "+self.message.to_text + extra = if self.message.is_nothing then "" else " (message = "+self.message.to_text+")" "(Out_Of_Range (value = "+self.value.to_text+")" + extra + ")" + +## Indicates that a Float was used as a Dicionary key. +type Float_Used_As_Dictionary_Key + ## PRIVATE + Warning value:Float + + ## PRIVATE + Create a human-readable version of the error. + to_display_text : Text + to_display_text self = + "Float used as dictionary key: "+self.value.to_text + + ## PRIVATE + to_text : Text + to_text self = + "(Float_Used_As_Dictionary_Key (value = "+self.value.to_text+"))" diff --git a/test/Base_Tests/src/Data/Dictionary_Spec.enso b/test/Base_Tests/src/Data/Dictionary_Spec.enso index 1686de4620fd..0e8a998d4277 100644 --- a/test/Base_Tests/src/Data/Dictionary_Spec.enso +++ b/test/Base_Tests/src/Data/Dictionary_Spec.enso @@ -1,6 +1,7 @@ from Standard.Base import all import Standard.Base.Errors.Illegal_Argument.Illegal_Argument import Standard.Base.Errors.No_Such_Key.No_Such_Key +from Standard.Base.Errors.Common import Float_Used_As_Dictionary_Key from Standard.Test import all @@ -269,6 +270,11 @@ add_specs suite_builder = m.at 200 . should_equal 3 m.at Nothing . should_equal 1 + group_builder.specify "should attach a warning when a Float is used as a key" <| + m = Dictionary.empty . insert 1.2 3 + m.at 1.2 . should_equal 3 + Problems.expect_only_warning Float_Used_As_Dictionary_Key m + suite_builder.group "Polyglot keys and values" group_builder-> group_builder.specify "should support polyglot keys" pending=pending_js_missing <| dict = Dictionary.singleton (js_str "A") 42 From 1c4fd38e54e5edfc88989823095074a258a73d59 Mon Sep 17 00:00:00 2001 From: Gregory Travis Date: Tue, 29 Oct 2024 16:37:25 -0400 Subject: [PATCH 02/12] insert no_warning, make distinct tests consistent --- .../Base/0.0.0-dev/src/Data/Dictionary.enso | 6 ++--- .../src/Internal/Array_Like_Helpers.enso | 2 +- test/Benchmarks/src/Vector/Distinct.enso | 26 +++++++++++++------ test/Benchmarks/src/Vector/Utils.enso | 5 ++++ 4 files changed, 27 insertions(+), 12 deletions(-) diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Dictionary.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Dictionary.enso index 314d32875979..0e5a44b8546c 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Dictionary.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Dictionary.enso @@ -166,10 +166,10 @@ type Dictionary key value example_insert = Examples.dictionary.insert 7 "seven" @key (make_all_selector ..Always) @value (make_all_selector ..Always) - insert : Any -> Any -> Dictionary - insert self key=(Missing_Argument.throw "key") value=(Missing_Argument.throw "value") = + insert : Any -> Any -> Boolean -> Dictionary + insert self key=(Missing_Argument.throw "key") value=(Missing_Argument.throw "value") no_warning:Boolean=False = new_dict = self.insert_builtin key value - if key.is_a Float . not then new_dict else + if (key.is_a Float . not) || no_warning then new_dict else Warning.attach (Float_Used_As_Dictionary_Key.Warning key) new_dict ## GROUP Selections diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Internal/Array_Like_Helpers.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Internal/Array_Like_Helpers.enso index f308849ce30c..71b8a7dab356 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Internal/Array_Like_Helpers.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Internal/Array_Like_Helpers.enso @@ -171,7 +171,7 @@ distinct vector on = key = on item if (existing.get key False) then existing else builder.append item - existing.insert key True + existing.insert key True no_warning=True duplicates vector on = Vector.build builder-> counts = vector.fold Dictionary.empty current-> item-> diff --git a/test/Benchmarks/src/Vector/Distinct.enso b/test/Benchmarks/src/Vector/Distinct.enso index d6cf1077eda3..a70d16d552d6 100644 --- a/test/Benchmarks/src/Vector/Distinct.enso +++ b/test/Benchmarks/src/Vector/Distinct.enso @@ -9,25 +9,31 @@ options = Bench.options . set_warmup (Bench.phase_conf 1 3) . set_measure (Bench type Data - Value ~random_vec ~uniform_vec ~random_text_vec ~uniform_text_vec + Value ~random_integer_vec ~uniform_integer_vec ~random_float_vec ~uniform_float_vec ~random_text_vec ~uniform_text_vec create = - Data.Value create_random_vec create_uniform_vec create_random_text_vec create_uniform_text_vec + Data.Value create_random_integer_vec create_uniform_integer_vec create_random_float_vec create_uniform_float_vec create_random_text_vec create_uniform_text_vec -create_random_vec = Utils.make_random_vec 100000 +create_random_integer_vec = Utils.make_random_integer_vec 100000 -create_uniform_vec = Vector.fill 100000 1 +create_random_float_vec = Utils.make_random_vec 100000 + + +create_uniform_integer_vec = Vector.fill 100000 1 + + +create_uniform_float_vec = Vector.fill 100000 1.2 create_random_text_vec = - random_vec = create_random_vec + random_vec = create_random_float_vec random_vec.map .to_text create_uniform_text_vec = - uniform_vec = create_uniform_vec + uniform_vec = create_uniform_integer_vec uniform_vec.map .to_text @@ -36,9 +42,13 @@ collect_benches = Bench.build builder-> builder.group "Vector_Distinct" options group_builder-> group_builder.specify "Random_Integer_Vector_Distinct_v2" <| - data.random_vec.distinct + data.random_integer_vec.distinct group_builder.specify "Uniform_Integer_Vector_Distinct" <| - data.uniform_vec.distinct + data.uniform_integer_vec.distinct + group_builder.specify "Random_Float_Vector_Distinct_v2" <| + data.random_float_vec.distinct + group_builder.specify "Uniform_Float_Vector_Distinct" <| + data.uniform_float_vec.distinct group_builder.specify "Random_Text_Vector_Distinct_v2" <| data.random_text_vec.distinct group_builder.specify "Uniform_Text_Vector_Distinct" <| diff --git a/test/Benchmarks/src/Vector/Utils.enso b/test/Benchmarks/src/Vector/Utils.enso index 2bbacfd0a73a..50783e8d4595 100644 --- a/test/Benchmarks/src/Vector/Utils.enso +++ b/test/Benchmarks/src/Vector/Utils.enso @@ -7,6 +7,11 @@ make_random_vec n = random_gen = Java_Random.new n Vector.new n (_-> random_gen.nextDouble) +make_random_integer_vec : Integer -> Vector +make_random_integer_vec n = + random_gen = Java_Random.new n + Vector.new n (_-> random_gen.nextInt) + make_random_rational_vec n = random_gen = Java_Random.new n Vector.new n _-> From 3f2847e17d1be1ba68ce39513d223aeeb326e06c Mon Sep 17 00:00:00 2001 From: Gregory Travis Date: Tue, 29 Oct 2024 16:39:05 -0400 Subject: [PATCH 03/12] rename make_random_vec --- test/Benchmarks/src/Vector/Distinct.enso | 2 +- test/Benchmarks/src/Vector/Operations.enso | 4 ++-- test/Benchmarks/src/Vector/Sort.enso | 8 ++++---- test/Benchmarks/src/Vector/Utils.enso | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/test/Benchmarks/src/Vector/Distinct.enso b/test/Benchmarks/src/Vector/Distinct.enso index a70d16d552d6..725171fcc55b 100644 --- a/test/Benchmarks/src/Vector/Distinct.enso +++ b/test/Benchmarks/src/Vector/Distinct.enso @@ -18,7 +18,7 @@ type Data create_random_integer_vec = Utils.make_random_integer_vec 100000 -create_random_float_vec = Utils.make_random_vec 100000 +create_random_float_vec = Utils.make_random_float_vec 100000 create_uniform_integer_vec = Vector.fill 100000 1 diff --git a/test/Benchmarks/src/Vector/Operations.enso b/test/Benchmarks/src/Vector/Operations.enso index ca4dd8fef600..fa5f49c7c69d 100644 --- a/test/Benchmarks/src/Vector/Operations.enso +++ b/test/Benchmarks/src/Vector/Operations.enso @@ -14,8 +14,8 @@ options = Bench.options . set_warmup (Bench.phase_conf 5 5) . set_measure (Bench collect_benches = Bench.build builder-> vector_size = 1000000 - random_vec = Utils.make_random_vec vector_size - random_vec_2 = Utils.make_random_vec 100000 + random_vec = Utils.make_random_float_vec vector_size + random_vec_2 = Utils.make_random_float_vec 100000 random_gen = Java_Random.new 123456 stateful_fun x = s = State.get Number diff --git a/test/Benchmarks/src/Vector/Sort.enso b/test/Benchmarks/src/Vector/Sort.enso index adf4ea088417..e659e35e0d9b 100644 --- a/test/Benchmarks/src/Vector/Sort.enso +++ b/test/Benchmarks/src/Vector/Sort.enso @@ -70,8 +70,8 @@ type Data create vec_size = f1 s = Data.make_sorted_vec s f2 s = make_partially_sorted_vec s - f3 s = Data.make_random_vec s - f4 s = (Data.make_random_vec s).map (v -> Int.Value v) + f3 s = Data.make_random_float_vec s + f4 s = (Data.make_random_float_vec s).map (v -> Int.Value v) f5 s = Utils.make_random_rational_vec s f6 s = f5 s . map (x-> x.to_float . floor + 2) Data.Value (f1 vec_size) (f2 vec_size) (f3 vec_size) (f4 vec_size) (f5 vec_size) (f6 vec_size) @@ -79,8 +79,8 @@ type Data make_sorted_vec vec_size = make_sorted_ascending_vec vec_size - make_random_vec vec_size = - Utils.make_random_vec vec_size + make_random_float_vec vec_size = + Utils.make_random_float_vec vec_size collect_benches = Bench.build builder-> diff --git a/test/Benchmarks/src/Vector/Utils.enso b/test/Benchmarks/src/Vector/Utils.enso index 50783e8d4595..6c77686d6a05 100644 --- a/test/Benchmarks/src/Vector/Utils.enso +++ b/test/Benchmarks/src/Vector/Utils.enso @@ -2,8 +2,8 @@ from Standard.Base import all polyglot java import java.util.Random as Java_Random -make_random_vec : Integer -> Vector -make_random_vec n = +make_random_float_vec : Integer -> Vector +make_random_float_vec n = random_gen = Java_Random.new n Vector.new n (_-> random_gen.nextDouble) From 90fe26b93675c9b01b6f8768901f063c0db9e5da Mon Sep 17 00:00:00 2001 From: Gregory Travis Date: Mon, 4 Nov 2024 11:08:25 -0500 Subject: [PATCH 04/12] from_vector test --- test/Base_Tests/src/Data/Dictionary_Spec.enso | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/Base_Tests/src/Data/Dictionary_Spec.enso b/test/Base_Tests/src/Data/Dictionary_Spec.enso index 0e8a998d4277..f9a74367018d 100644 --- a/test/Base_Tests/src/Data/Dictionary_Spec.enso +++ b/test/Base_Tests/src/Data/Dictionary_Spec.enso @@ -275,6 +275,11 @@ add_specs suite_builder = m.at 1.2 . should_equal 3 Problems.expect_only_warning Float_Used_As_Dictionary_Key m + group_builder.specify "should attach a warning when a Float is used as a key (using from_vector)" <| + m = Dictionary.from_vector [[2, 3], [1.2, 3], [4, 5]] + m.at 1.2 . should_equal 3 + Problems.expect_only_warning Float_Used_As_Dictionary_Key m + suite_builder.group "Polyglot keys and values" group_builder-> group_builder.specify "should support polyglot keys" pending=pending_js_missing <| dict = Dictionary.singleton (js_str "A") 42 From afead1aaf050e39b3f2c5d9c266a5250ffdf29d3 Mon Sep 17 00:00:00 2001 From: Gregory Travis Date: Mon, 4 Nov 2024 12:38:34 -0500 Subject: [PATCH 05/12] add sparse --- test/Benchmarks/src/Map/Hash_Map.enso | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/test/Benchmarks/src/Map/Hash_Map.enso b/test/Benchmarks/src/Map/Hash_Map.enso index 743336cb3fb0..8c9d788c0858 100644 --- a/test/Benchmarks/src/Map/Hash_Map.enso +++ b/test/Benchmarks/src/Map/Hash_Map.enso @@ -9,13 +9,16 @@ polyglot java import org.enso.benchmark_helpers.JavaHashMapWrapper options = Bench.options . set_warmup (Bench.phase_conf 2 2) . set_measure (Bench.phase_conf 2 3) type Data - Value ~ints + Value ~dense_ints ~sparse_ints create n = - create_ints = + create_dense_ints = Vector.new n _-> Random.integer 0 ((n.div 100) - 1) - Data.Value create_ints + create_sparse_ints = + Vector.new n _-> + Random.integer 0 (n - 1) + Data.Value create_dense_ints create_sparse_ints type Scenario Instance map_constructor @@ -43,15 +46,23 @@ collect_benches = Bench.build builder-> builder.group ("Enso_Hash_Map_" + n.to_text) options group_builder-> # Scenario similar to what is done in distinct + # 'Sparse' ints have fewer duplicates and cause more inserts to happen. + group_builder.specify "Enso_Sparse_Incremental" <| + Scenario.Instance (_ -> Dictionary.empty) . run_distinct data.sparse_ints + group_builder.specify "Java_Sparse_Incremental" <| + Scenario.Instance (_ -> JavaHashMapWrapper.new) . run_distinct data.sparse_ints + + # Scenario similar to what is done in distinct + # 'Dense' ints have more duplicates and cause fewer inserts to happen. group_builder.specify "Enso_Incremental" <| - Scenario.Instance (_ -> Dictionary.empty) . run_distinct data.ints + Scenario.Instance (_ -> Dictionary.empty) . run_distinct data.dense_ints group_builder.specify "Java_Incremental" <| - Scenario.Instance (_ -> JavaHashMapWrapper.new) . run_distinct data.ints + Scenario.Instance (_ -> JavaHashMapWrapper.new) . run_distinct data.dense_ints # A scenario similar to what is done in add_row_number with grouping group_builder.specify "Enso_Replacement" <| - Scenario.Instance (_ -> Dictionary.empty) . run_count_keys data.ints + Scenario.Instance (_ -> Dictionary.empty) . run_count_keys data.dense_ints group_builder.specify "Java_Replacement" <| - Scenario.Instance (_ -> JavaHashMapWrapper.new) . run_count_keys data.ints + Scenario.Instance (_ -> JavaHashMapWrapper.new) . run_count_keys data.dense_ints main = collect_benches . run_main From 5cb0fc2fc67ac2f461c6ae9d537f0024545af937 Mon Sep 17 00:00:00 2001 From: Gregory Travis Date: Tue, 5 Nov 2024 09:46:21 -0500 Subject: [PATCH 06/12] case instead of is_a --- .../lib/Standard/Base/0.0.0-dev/src/Data/Dictionary.enso | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Dictionary.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Dictionary.enso index 0e5a44b8546c..ad091c7d02cb 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Dictionary.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Dictionary.enso @@ -169,8 +169,11 @@ type Dictionary key value insert : Any -> Any -> Boolean -> Dictionary insert self key=(Missing_Argument.throw "key") value=(Missing_Argument.throw "value") no_warning:Boolean=False = new_dict = self.insert_builtin key value - if (key.is_a Float . not) || no_warning then new_dict else - Warning.attach (Float_Used_As_Dictionary_Key.Warning key) new_dict + case key of + _ : Float -> + if no_warning then new_dict else + Warning.attach (Float_Used_As_Dictionary_Key.Warning key) new_dict + _ -> new_dict ## GROUP Selections ICON table_clean From 682381f8e53abf4c392202ffffb01dd13f60de1c Mon Sep 17 00:00:00 2001 From: Gregory Travis Date: Wed, 6 Nov 2024 15:14:11 -0500 Subject: [PATCH 07/12] combine error with FPE --- .../Base/0.0.0-dev/src/Data/Dictionary.enso | 4 +-- .../Base/0.0.0-dev/src/Errors/Common.enso | 26 ++++++++++++++----- .../Database/0.0.0-dev/src/DB_Column.enso | 4 +-- .../Database/0.0.0-dev/src/DB_Table.enso | 1 + .../src/Internal/Aggregate_Helper.enso | 4 +-- .../Common/Database_Distinct_Helper.enso | 3 +-- .../Internal/Common/Database_Join_Helper.enso | 2 +- .../Standard/Table/0.0.0-dev/src/Column.enso | 3 ++- .../Standard/Table/0.0.0-dev/src/Errors.enso | 13 ---------- .../0.0.0-dev/src/Internal/Java_Problems.enso | 1 + .../src/Internal/Lookup_Helpers.enso | 3 ++- .../src/Internal/Multi_Value_Key.enso | 2 +- .../Standard/Table/0.0.0-dev/src/Table.enso | 1 + test/Base_Tests/src/Data/Dictionary_Spec.enso | 6 ++--- .../Add_Row_Number_Spec.enso | 3 ++- .../Aggregate_Spec.enso | 1 + .../Column_Operations_Spec.enso | 1 + .../Cross_Tab_Spec.enso | 1 + .../Distinct_Spec.enso | 1 + .../Expression_Spec.enso | 1 + .../Common_Table_Operations/Filter_Spec.enso | 1 + .../Join/Join_Spec.enso | 1 + .../Join/Lookup_Spec.enso | 1 + .../Table_Tests/src/In_Memory/Table_Spec.enso | 3 ++- 24 files changed, 50 insertions(+), 37 deletions(-) diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Dictionary.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Dictionary.enso index ad091c7d02cb..66c495204ab8 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Dictionary.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Dictionary.enso @@ -15,7 +15,7 @@ import project.Panic.Panic import project.Warning.Warning from project.Data.Boolean import Boolean, False, True from project.Data.Text.Extensions import all -from project.Errors.Common import Float_Used_As_Dictionary_Key +from project.Errors.Common import Floating_Point_Equality from project.Metadata.Choice import Option from project.Metadata.Widget import Single_Choice, Vector_Editor from project.Widget_Helpers import make_all_selector @@ -172,7 +172,7 @@ type Dictionary key value case key of _ : Float -> if no_warning then new_dict else - Warning.attach (Float_Used_As_Dictionary_Key.Warning key) new_dict + Warning.attach (Floating_Point_Equality.Used_As_Dictionary_Key key) new_dict _ -> new_dict ## GROUP Selections diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Errors/Common.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Errors/Common.enso index 8098f28e47f4..eea34b95555d 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Errors/Common.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Errors/Common.enso @@ -579,18 +579,30 @@ type Response_Too_Large handle_java_exception ~action = Panic.catch ResponseTooLargeException action (cause-> Error.throw (Response_Too_Large.Error cause.payload.getLimit)) -## Indicates that a Float was used as a Dicionary key. -type Float_Used_As_Dictionary_Key +## Indicates that some operation relies on equality on floating-point values, + which is not recommended. +type Floating_Point_Equality ## PRIVATE - Warning value:Float + Represents a general floating-point equality error, such as a direct comparison. + Error (location:Text) + + ## PRIVATE + Represents the use of a floating-point value as a `Dictionary` key. + Used_As_Dictionary_Key value:Float ## PRIVATE Create a human-readable version of the error. to_display_text : Text - to_display_text self = - "Float used as dictionary key: "+self.value.to_text + to_display_text self = case self of + Floating_Point_Equality.Error location -> + "Relying on equality of floating-point numbers is not recommended (within "+location+")." + Floating_Point_Equality.Used_As_Dictionary_Key value -> + "Float used as dictionary key: "+value.to_text ## PRIVATE to_text : Text - to_text self = - "(Float_Used_As_Dictionary_Key (value = "+self.value.to_text+"))" + to_text self = case self of + Floating_Point_Equality.Error location -> + "(Error (location = "+location+"))" + Floating_Point_Equality.Used_As_Dictionary_Key value -> + "(Used_As_Dictionary_Key (value = "+value.to_text+"))" diff --git a/distribution/lib/Standard/Database/0.0.0-dev/src/DB_Column.enso b/distribution/lib/Standard/Database/0.0.0-dev/src/DB_Column.enso index aaa9befeed45..f81e7fd0b03a 100644 --- a/distribution/lib/Standard/Database/0.0.0-dev/src/DB_Column.enso +++ b/distribution/lib/Standard/Database/0.0.0-dev/src/DB_Column.enso @@ -1,8 +1,8 @@ from Standard.Base import all -import Standard.Base.Errors.Common.Index_Out_Of_Bounds import Standard.Base.Errors.Illegal_Argument.Illegal_Argument import Standard.Base.Errors.Illegal_State.Illegal_State import Standard.Base.Internal.Rounding_Helpers +from Standard.Base.Errors.Common import Index_Out_Of_Bounds, Floating_Point_Equality from Standard.Base.Widget_Helpers import make_data_cleanse_vector_selector, make_format_chooser, make_regex_text_widget import Standard.Table.Internal.Column_Naming_Helper.Column_Naming_Helper @@ -14,7 +14,7 @@ import Standard.Table.Internal.Widget_Helpers import Standard.Table.Rows_To_Read.Rows_To_Read from Standard.Table import Auto, Column, Data_Formatter, Previous_Value, Sort_Column, Table, Value_Type from Standard.Table.Column import default_date_period -from Standard.Table.Errors import Conversion_Failure, Floating_Point_Equality, Inexact_Type_Coercion, Invalid_Value_Type +from Standard.Table.Errors import Conversion_Failure, Inexact_Type_Coercion, Invalid_Value_Type from Standard.Table.Internal.Cast_Helpers import check_cast_compatibility import project.Connection.Connection.Connection diff --git a/distribution/lib/Standard/Database/0.0.0-dev/src/DB_Table.enso b/distribution/lib/Standard/Database/0.0.0-dev/src/DB_Table.enso index aeb29ce22f4a..958b2ea9298c 100644 --- a/distribution/lib/Standard/Database/0.0.0-dev/src/DB_Table.enso +++ b/distribution/lib/Standard/Database/0.0.0-dev/src/DB_Table.enso @@ -4,6 +4,7 @@ import Standard.Base.Data.Filter_Condition as Filter_Condition_Module import Standard.Base.Data.Time.Errors.Date_Time_Format_Parse_Error import Standard.Base.Data.Vector.Builder import Standard.Base.Errors.Common.Additional_Warnings +import Standard.Base.Errors.Common.Floating_Point_Equality import Standard.Base.Errors.Common.Incomparable_Values import Standard.Base.Errors.Common.Index_Out_Of_Bounds import Standard.Base.Errors.Common.Type_Error diff --git a/distribution/lib/Standard/Database/0.0.0-dev/src/Internal/Aggregate_Helper.enso b/distribution/lib/Standard/Database/0.0.0-dev/src/Internal/Aggregate_Helper.enso index bdbdba665322..b13515f13277 100644 --- a/distribution/lib/Standard/Database/0.0.0-dev/src/Internal/Aggregate_Helper.enso +++ b/distribution/lib/Standard/Database/0.0.0-dev/src/Internal/Aggregate_Helper.enso @@ -1,14 +1,14 @@ from Standard.Base import all -import Standard.Base.Errors.Common.No_Such_Method import Standard.Base.Errors.Deprecated.Deprecated import Standard.Base.Errors.Illegal_Argument.Illegal_Argument +from Standard.Base.Errors.Common import Floating_Point_Equality, No_Such_Method import Standard.Table.Internal.Aggregate_Column_Helper import Standard.Table.Internal.Aggregate_Column_Helper.Internal_Order_By_Column_Reference import Standard.Table.Internal.Problem_Builder.Problem_Builder from Standard.Table import Aggregate_Column from Standard.Table.Aggregate_Column.Aggregate_Column import all -from Standard.Table.Errors import Floating_Point_Equality, No_Output_Columns +from Standard.Table.Errors import No_Output_Columns import project.DB_Table.DB_Table import project.Dialect.Dialect diff --git a/distribution/lib/Standard/Database/0.0.0-dev/src/Internal/Common/Database_Distinct_Helper.enso b/distribution/lib/Standard/Database/0.0.0-dev/src/Internal/Common/Database_Distinct_Helper.enso index 4d4e06d1a080..11c924863b6d 100644 --- a/distribution/lib/Standard/Database/0.0.0-dev/src/Internal/Common/Database_Distinct_Helper.enso +++ b/distribution/lib/Standard/Database/0.0.0-dev/src/Internal/Common/Database_Distinct_Helper.enso @@ -1,6 +1,5 @@ from Standard.Base import all - -from Standard.Table.Errors import Floating_Point_Equality +import Standard.Base.Errors.Common.Floating_Point_Equality import project.Internal.Helpers import project.Internal.IR.SQL_Expression.SQL_Expression diff --git a/distribution/lib/Standard/Database/0.0.0-dev/src/Internal/Common/Database_Join_Helper.enso b/distribution/lib/Standard/Database/0.0.0-dev/src/Internal/Common/Database_Join_Helper.enso index 78ca8456285b..db09b65cfd0b 100644 --- a/distribution/lib/Standard/Database/0.0.0-dev/src/Internal/Common/Database_Join_Helper.enso +++ b/distribution/lib/Standard/Database/0.0.0-dev/src/Internal/Common/Database_Join_Helper.enso @@ -1,10 +1,10 @@ from Standard.Base import all import Standard.Base.Errors.Illegal_State.Illegal_State +from Standard.Base.Errors.Common import Floating_Point_Equality import Standard.Table.Internal.Join_Helpers import Standard.Table.Internal.Unique_Name_Strategy.Unique_Name_Strategy from Standard.Table import Join_Kind -from Standard.Table.Errors import Floating_Point_Equality import project.Connection.Connection.Connection import project.DB_Table.DB_Table diff --git a/distribution/lib/Standard/Table/0.0.0-dev/src/Column.enso b/distribution/lib/Standard/Table/0.0.0-dev/src/Column.enso index 85788f83ba09..0858f59b201f 100644 --- a/distribution/lib/Standard/Table/0.0.0-dev/src/Column.enso +++ b/distribution/lib/Standard/Table/0.0.0-dev/src/Column.enso @@ -2,6 +2,7 @@ from Standard.Base import all import Standard.Base.Data.Array_Proxy.Array_Proxy import Standard.Base.Data.Vector.No_Wrap import Standard.Base.Errors.Common.Arithmetic_Error +import Standard.Base.Errors.Common.Floating_Point_Equality import Standard.Base.Errors.Common.Incomparable_Values import Standard.Base.Errors.Common.Index_Out_Of_Bounds import Standard.Base.Errors.Common.No_Such_Method @@ -29,7 +30,7 @@ import project.Rows_To_Read.Rows_To_Read import project.Table.Table import project.Value_Type.Auto import project.Value_Type.Value_Type -from project.Errors import Conversion_Failure, Floating_Point_Equality, Inexact_Type_Coercion, Invalid_Column_Names, Invalid_Value_Type, No_Index_Set_Error +from project.Errors import Conversion_Failure, Inexact_Type_Coercion, Invalid_Column_Names, Invalid_Value_Type, No_Index_Set_Error from project.Internal.Column_Format import all from project.Internal.Java_Exports import make_date_builder_adapter, make_string_builder from project.Internal.Storage import enso_to_java, java_to_enso diff --git a/distribution/lib/Standard/Table/0.0.0-dev/src/Errors.enso b/distribution/lib/Standard/Table/0.0.0-dev/src/Errors.enso index ff0455ecc60e..d7641bf01c6c 100644 --- a/distribution/lib/Standard/Table/0.0.0-dev/src/Errors.enso +++ b/distribution/lib/Standard/Table/0.0.0-dev/src/Errors.enso @@ -169,19 +169,6 @@ type Ignored_Nothing_Values to_display_text self = "The column "+self.column+" contained Nothing values in rows " + self.rows.short_display_text + " which were ignored." -## Indicates that some operation relies on equality on floating-point values, - which is not recommended. -type Floating_Point_Equality - ## PRIVATE - Error (location:Text) - - ## PRIVATE - - Create a human-readable version of the error. - to_display_text : Text - to_display_text self = - "Relying on equality of floating-point numbers is not recommended (within "+self.location+")." - ## Indicates that a text value with a delimiter was included in a concatenation without any quote character type Unquoted_Delimiter diff --git a/distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Java_Problems.enso b/distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Java_Problems.enso index 8c244bf529a2..c2821c8731e8 100644 --- a/distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Java_Problems.enso +++ b/distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Java_Problems.enso @@ -2,6 +2,7 @@ from Standard.Base import all import Standard.Base.Data.Vector.No_Wrap import Standard.Base.Errors.Common.Additional_Warnings import Standard.Base.Errors.Common.Arithmetic_Error +import Standard.Base.Errors.Common.Floating_Point_Equality import Standard.Base.Errors.Illegal_Argument.Illegal_Argument import project.Internal.Storage diff --git a/distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Lookup_Helpers.enso b/distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Lookup_Helpers.enso index 8ec79d4fee96..73e03b10bc85 100644 --- a/distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Lookup_Helpers.enso +++ b/distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Lookup_Helpers.enso @@ -1,12 +1,13 @@ from Standard.Base import all import Standard.Base.Data.Vector.Builder import Standard.Base.Data.Vector.No_Wrap +import Standard.Base.Errors.Common.Floating_Point_Equality import Standard.Base.Errors.Illegal_Argument.Illegal_Argument import project.Internal.Storage import project.Internal.Value_Type_Helpers import project.Value_Type.Value_Type -from project.Errors import Floating_Point_Equality, Missing_Input_Columns, No_Common_Type, No_Output_Columns, Unexpected_Extra_Columns +from project.Errors import Missing_Input_Columns, No_Common_Type, No_Output_Columns, Unexpected_Extra_Columns polyglot java import org.enso.table.data.table.join.lookup.LookupColumnDescription diff --git a/distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Multi_Value_Key.enso b/distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Multi_Value_Key.enso index 967ce851bf36..d4a34f9ba671 100644 --- a/distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Multi_Value_Key.enso +++ b/distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Multi_Value_Key.enso @@ -1,10 +1,10 @@ from Standard.Base import all import Standard.Base.Data.Array_Proxy.Array_Proxy +import Standard.Base.Errors.Common.Floating_Point_Equality import Standard.Base.Errors.Illegal_State.Illegal_State import project.Column.Column import project.Value_Type.Value_Type -from project.Errors import Floating_Point_Equality ## PRIVATE An Enso implementation mirroring `UnorderedMultiValueKey` from the Java diff --git a/distribution/lib/Standard/Table/0.0.0-dev/src/Table.enso b/distribution/lib/Standard/Table/0.0.0-dev/src/Table.enso index 1888f5732bca..262015504cec 100644 --- a/distribution/lib/Standard/Table/0.0.0-dev/src/Table.enso +++ b/distribution/lib/Standard/Table/0.0.0-dev/src/Table.enso @@ -4,6 +4,7 @@ import Standard.Base.Data.Filter_Condition as Filter_Condition_Module import Standard.Base.Data.Time.Errors.Date_Time_Format_Parse_Error import Standard.Base.Data.Vector.No_Wrap import Standard.Base.Errors.Common.Additional_Warnings +import Standard.Base.Errors.Common.Floating_Point_Equality import Standard.Base.Errors.Common.Incomparable_Values import Standard.Base.Errors.Common.Index_Out_Of_Bounds import Standard.Base.Errors.Common.No_Such_Method diff --git a/test/Base_Tests/src/Data/Dictionary_Spec.enso b/test/Base_Tests/src/Data/Dictionary_Spec.enso index f9a74367018d..9ceb807dbe69 100644 --- a/test/Base_Tests/src/Data/Dictionary_Spec.enso +++ b/test/Base_Tests/src/Data/Dictionary_Spec.enso @@ -1,7 +1,7 @@ from Standard.Base import all import Standard.Base.Errors.Illegal_Argument.Illegal_Argument import Standard.Base.Errors.No_Such_Key.No_Such_Key -from Standard.Base.Errors.Common import Float_Used_As_Dictionary_Key +from Standard.Base.Errors.Common import Floating_Point_Equality from Standard.Test import all @@ -273,12 +273,12 @@ add_specs suite_builder = group_builder.specify "should attach a warning when a Float is used as a key" <| m = Dictionary.empty . insert 1.2 3 m.at 1.2 . should_equal 3 - Problems.expect_only_warning Float_Used_As_Dictionary_Key m + Problems.expect_only_warning Floating_Point_Equality m group_builder.specify "should attach a warning when a Float is used as a key (using from_vector)" <| m = Dictionary.from_vector [[2, 3], [1.2, 3], [4, 5]] m.at 1.2 . should_equal 3 - Problems.expect_only_warning Float_Used_As_Dictionary_Key m + Problems.expect_only_warning Floating_Point_Equality m suite_builder.group "Polyglot keys and values" group_builder-> group_builder.specify "should support polyglot keys" pending=pending_js_missing <| diff --git a/test/Table_Tests/src/Common_Table_Operations/Add_Row_Number_Spec.enso b/test/Table_Tests/src/Common_Table_Operations/Add_Row_Number_Spec.enso index 5889ec920c65..6f8122bcaec4 100644 --- a/test/Table_Tests/src/Common_Table_Operations/Add_Row_Number_Spec.enso +++ b/test/Table_Tests/src/Common_Table_Operations/Add_Row_Number_Spec.enso @@ -1,4 +1,5 @@ from Standard.Base import all +import Standard.Base.Errors.Common.Floating_Point_Equality import Standard.Base.Errors.Illegal_Argument.Illegal_Argument import Standard.Database.Extensions.Upload_Database_Table @@ -7,7 +8,7 @@ import Standard.Database.Feature.Feature from Standard.Database.Errors import all from Standard.Table import Sort_Column, Aggregate_Column -from Standard.Table.Errors import Missing_Input_Columns, Duplicate_Output_Column_Names, Floating_Point_Equality +from Standard.Table.Errors import Missing_Input_Columns, Duplicate_Output_Column_Names from Standard.Test import all diff --git a/test/Table_Tests/src/Common_Table_Operations/Aggregate_Spec.enso b/test/Table_Tests/src/Common_Table_Operations/Aggregate_Spec.enso index 8b57b1571370..fc2eca968c14 100644 --- a/test/Table_Tests/src/Common_Table_Operations/Aggregate_Spec.enso +++ b/test/Table_Tests/src/Common_Table_Operations/Aggregate_Spec.enso @@ -1,4 +1,5 @@ from Standard.Base import all +import Standard.Base.Errors.Common.Floating_Point_Equality from Standard.Table import Table, Sort_Column, expr from Standard.Table.Aggregate_Column.Aggregate_Column import all diff --git a/test/Table_Tests/src/Common_Table_Operations/Column_Operations_Spec.enso b/test/Table_Tests/src/Common_Table_Operations/Column_Operations_Spec.enso index c495a40a3cbc..8a3f7b21f410 100644 --- a/test/Table_Tests/src/Common_Table_Operations/Column_Operations_Spec.enso +++ b/test/Table_Tests/src/Common_Table_Operations/Column_Operations_Spec.enso @@ -1,6 +1,7 @@ from Standard.Base import all import Standard.Base.Errors.Common.Arithmetic_Error +import Standard.Base.Errors.Common.Floating_Point_Equality import Standard.Base.Errors.Common.Incomparable_Values import Standard.Base.Errors.Common.Type_Error import Standard.Base.Errors.Illegal_Argument.Illegal_Argument diff --git a/test/Table_Tests/src/Common_Table_Operations/Cross_Tab_Spec.enso b/test/Table_Tests/src/Common_Table_Operations/Cross_Tab_Spec.enso index 697c9f9e22ca..c0d17b70a245 100644 --- a/test/Table_Tests/src/Common_Table_Operations/Cross_Tab_Spec.enso +++ b/test/Table_Tests/src/Common_Table_Operations/Cross_Tab_Spec.enso @@ -1,4 +1,5 @@ from Standard.Base import all +import Standard.Base.Errors.Common.Floating_Point_Equality import Standard.Base.Errors.Illegal_Argument.Illegal_Argument from Standard.Table import Aggregate_Column, expr diff --git a/test/Table_Tests/src/Common_Table_Operations/Distinct_Spec.enso b/test/Table_Tests/src/Common_Table_Operations/Distinct_Spec.enso index 71a51391c701..6f27f4f0dac8 100644 --- a/test/Table_Tests/src/Common_Table_Operations/Distinct_Spec.enso +++ b/test/Table_Tests/src/Common_Table_Operations/Distinct_Spec.enso @@ -1,4 +1,5 @@ from Standard.Base import all +import Standard.Base.Errors.Common.Floating_Point_Equality from Standard.Table import Sort_Column from Standard.Table.Errors import all diff --git a/test/Table_Tests/src/Common_Table_Operations/Expression_Spec.enso b/test/Table_Tests/src/Common_Table_Operations/Expression_Spec.enso index 5b22dace61d8..33ae74d4a4fa 100644 --- a/test/Table_Tests/src/Common_Table_Operations/Expression_Spec.enso +++ b/test/Table_Tests/src/Common_Table_Operations/Expression_Spec.enso @@ -1,5 +1,6 @@ from Standard.Base import all import Standard.Base.Errors.Common.Arithmetic_Error +import Standard.Base.Errors.Common.Floating_Point_Equality import Standard.Base.Errors.Illegal_State.Illegal_State import Standard.Base.Errors.Illegal_Argument.Illegal_Argument diff --git a/test/Table_Tests/src/Common_Table_Operations/Filter_Spec.enso b/test/Table_Tests/src/Common_Table_Operations/Filter_Spec.enso index d386b2fb2ea2..7fd746d25c75 100644 --- a/test/Table_Tests/src/Common_Table_Operations/Filter_Spec.enso +++ b/test/Table_Tests/src/Common_Table_Operations/Filter_Spec.enso @@ -1,5 +1,6 @@ from Standard.Base import all import Standard.Base.Errors.Common.Arithmetic_Error +import Standard.Base.Errors.Common.Floating_Point_Equality import Standard.Base.Errors.Common.Index_Out_Of_Bounds import Standard.Base.Errors.Common.Missing_Argument import Standard.Base.Errors.Common.Type_Error diff --git a/test/Table_Tests/src/Common_Table_Operations/Join/Join_Spec.enso b/test/Table_Tests/src/Common_Table_Operations/Join/Join_Spec.enso index cc12db493316..068cacc99b4d 100644 --- a/test/Table_Tests/src/Common_Table_Operations/Join/Join_Spec.enso +++ b/test/Table_Tests/src/Common_Table_Operations/Join/Join_Spec.enso @@ -1,4 +1,5 @@ from Standard.Base import all +import Standard.Base.Errors.Common.Floating_Point_Equality import Standard.Base.Errors.Illegal_Argument.Illegal_Argument import Standard.Base.Errors.Illegal_State.Illegal_State diff --git a/test/Table_Tests/src/Common_Table_Operations/Join/Lookup_Spec.enso b/test/Table_Tests/src/Common_Table_Operations/Join/Lookup_Spec.enso index 3143a2b355e0..6bc2e152bbcf 100644 --- a/test/Table_Tests/src/Common_Table_Operations/Join/Lookup_Spec.enso +++ b/test/Table_Tests/src/Common_Table_Operations/Join/Lookup_Spec.enso @@ -1,4 +1,5 @@ from Standard.Base import all +import Standard.Base.Errors.Common.Floating_Point_Equality import Standard.Base.Errors.Illegal_Argument.Illegal_Argument from Standard.Table import all diff --git a/test/Table_Tests/src/In_Memory/Table_Spec.enso b/test/Table_Tests/src/In_Memory/Table_Spec.enso index fecd48c0ff0c..b6ae2ec7c7d2 100644 --- a/test/Table_Tests/src/In_Memory/Table_Spec.enso +++ b/test/Table_Tests/src/In_Memory/Table_Spec.enso @@ -1,5 +1,6 @@ from Standard.Base import all import Standard.Base.Data.Vector.Map_Error +import Standard.Base.Errors.Common.Floating_Point_Equality import Standard.Base.Errors.Common.Incomparable_Values import Standard.Base.Errors.Common.Index_Out_Of_Bounds import Standard.Base.Errors.Common.Type_Error @@ -7,7 +8,7 @@ import Standard.Base.Errors.Illegal_Argument.Illegal_Argument import Standard.Base.Runtime.Debug from Standard.Table import Table, Column, Sort_Column, Aggregate_Column, Blank_Selector, Value_Type -from Standard.Table.Errors import Invalid_Column_Names, Duplicate_Output_Column_Names, No_Input_Columns_Selected, Missing_Input_Columns, No_Such_Column, Floating_Point_Equality, Invalid_Value_Type, Row_Count_Mismatch +from Standard.Table.Errors import Invalid_Column_Names, Duplicate_Output_Column_Names, No_Input_Columns_Selected, Missing_Input_Columns, No_Such_Column, Invalid_Value_Type, Row_Count_Mismatch import Standard.Visualization From a900b4f2836b0bead703bd159030fe33ffc69113 Mon Sep 17 00:00:00 2001 From: Gregory Travis Date: Wed, 6 Nov 2024 15:14:34 -0500 Subject: [PATCH 08/12] wip --- .../lib/Standard/Base/0.0.0-dev/src/Errors/Common.enso | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Errors/Common.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Errors/Common.enso index eea34b95555d..27cf9710b0a9 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Errors/Common.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Errors/Common.enso @@ -596,7 +596,7 @@ type Floating_Point_Equality to_display_text self = case self of Floating_Point_Equality.Error location -> "Relying on equality of floating-point numbers is not recommended (within "+location+")." - Floating_Point_Equality.Used_As_Dictionary_Key value -> + Floating_Point_Equality.Used_As_Dictionary_Key value -> "Float used as dictionary key: "+value.to_text ## PRIVATE @@ -604,5 +604,5 @@ type Floating_Point_Equality to_text self = case self of Floating_Point_Equality.Error location -> "(Error (location = "+location+"))" - Floating_Point_Equality.Used_As_Dictionary_Key value -> + Floating_Point_Equality.Used_As_Dictionary_Key value -> "(Used_As_Dictionary_Key (value = "+value.to_text+"))" From 61a4e1f4d1d5bff3cddb0716a9f85d0c3441cb45 Mon Sep 17 00:00:00 2001 From: Gregory Travis Date: Wed, 6 Nov 2024 15:17:28 -0500 Subject: [PATCH 09/12] doc warning --- .../lib/Standard/Base/0.0.0-dev/src/Data/Dictionary.enso | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Dictionary.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Dictionary.enso index 66c495204ab8..e85535e75e40 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Dictionary.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Dictionary.enso @@ -158,6 +158,10 @@ type Dictionary key value - key: The key to insert the value for. - value: The value to associate with the `key`. + ! Error Conditions + - If a floating-point value is used as a key, a + `Floating_Point_Equality` warning is attached. + > Example Insert the value "seven" into the dictionary for the key 7. From 6a00aca9c00e844a0cfed8f96e8c4ba144372e74 Mon Sep 17 00:00:00 2001 From: Gregory Travis Date: Wed, 6 Nov 2024 15:19:03 -0500 Subject: [PATCH 10/12] review --- test/Benchmarks/src/Map/Hash_Map.enso | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/Benchmarks/src/Map/Hash_Map.enso b/test/Benchmarks/src/Map/Hash_Map.enso index 8c9d788c0858..c194f2cda272 100644 --- a/test/Benchmarks/src/Map/Hash_Map.enso +++ b/test/Benchmarks/src/Map/Hash_Map.enso @@ -46,14 +46,14 @@ collect_benches = Bench.build builder-> builder.group ("Enso_Hash_Map_" + n.to_text) options group_builder-> # Scenario similar to what is done in distinct - # 'Sparse' ints have fewer duplicates and cause more inserts to happen. + # 'Sparse' ints have fewer duplicates and cause more inserts and fewer updates to happen. group_builder.specify "Enso_Sparse_Incremental" <| Scenario.Instance (_ -> Dictionary.empty) . run_distinct data.sparse_ints group_builder.specify "Java_Sparse_Incremental" <| Scenario.Instance (_ -> JavaHashMapWrapper.new) . run_distinct data.sparse_ints # Scenario similar to what is done in distinct - # 'Dense' ints have more duplicates and cause fewer inserts to happen. + # 'Dense' ints have more duplicates and cause fewer inserts and more updates to happen. group_builder.specify "Enso_Incremental" <| Scenario.Instance (_ -> Dictionary.empty) . run_distinct data.dense_ints group_builder.specify "Java_Incremental" <| From 50691be1447fc44b80f754c8aa824a6ca057705d Mon Sep 17 00:00:00 2001 From: Gregory Travis Date: Wed, 13 Nov 2024 13:37:50 -0500 Subject: [PATCH 11/12] redundant import --- distribution/lib/Standard/Database/0.0.0-dev/src/DB_Column.enso | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distribution/lib/Standard/Database/0.0.0-dev/src/DB_Column.enso b/distribution/lib/Standard/Database/0.0.0-dev/src/DB_Column.enso index 9df47af68f39..a3afbc1c2494 100644 --- a/distribution/lib/Standard/Database/0.0.0-dev/src/DB_Column.enso +++ b/distribution/lib/Standard/Database/0.0.0-dev/src/DB_Column.enso @@ -1,10 +1,10 @@ from Standard.Base import all import Standard.Base.Data.Read.Many_Files_List.Many_Files_List import Standard.Base.Errors.Common.Index_Out_Of_Bounds +import Standard.Base.Errors.Common.Floating_Point_Equality import Standard.Base.Errors.Illegal_Argument.Illegal_Argument import Standard.Base.Errors.Illegal_State.Illegal_State import Standard.Base.Internal.Rounding_Helpers -from Standard.Base.Errors.Common import Index_Out_Of_Bounds, Floating_Point_Equality from Standard.Base.Widget_Helpers import make_data_cleanse_vector_selector, make_format_chooser, make_regex_text_widget import Standard.Table.Internal.Column_Naming_Helper.Column_Naming_Helper From 0e3fa03dc973d662433ba9d8f0b80543cb3c65bd Mon Sep 17 00:00:00 2001 From: Gregory Travis Date: Wed, 13 Nov 2024 17:03:09 -0500 Subject: [PATCH 12/12] bump