From 663644d12f1cc47c742f6caa7c3acd693e8a2490 Mon Sep 17 00:00:00 2001 From: James Dunkerley Date: Mon, 24 Feb 2025 16:55:46 +0000 Subject: [PATCH] Update Column to use new operators. --- .../lib/Standard/Table/0.0.0-dev/src/Column.enso | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) 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 c0f893c60a7c..ca68ac697a8c 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 @@ -48,6 +48,7 @@ polyglot java import org.enso.table.data.column.operation.CountNothing polyglot java import org.enso.table.data.column.operation.CountUntrimmed polyglot java import org.enso.table.data.column.operation.SampleOperation polyglot java import org.enso.table.data.column.operation.comparators.Comparators +polyglot java import org.enso.table.data.column.operation.text.TextPartOperation polyglot java import org.enso.table.data.column.operation.text.TextPredicates polyglot java import org.enso.table.data.column.operation.unary.DatePartOperation polyglot java import org.enso.table.data.column.operation.unary.DateTruncateOperation @@ -1318,10 +1319,9 @@ type Column example_text_length = Examples.text_column_1.text_left 5 text_left self (n : Column | Integer) -> Column = - Value_Type.expect_text self <| - Value_Type.expect_integer n <| - new_name = naming_helper.function_name "text_left" [self, n] - run_vectorized_binary_op self Java_Storage.Maps.TEXT_LEFT n new_name + Value_Type.expect_text self <| Value_Type.expect_integer n <| + new_name = naming_helper.function_name "text_left" [self, n] + _apply_case_sensitive_text_operation self n ..Default TextPartOperation.LEFT (a -> b -> a.take b) new_name ## GROUP Standard.Base.Text ICON preparation @@ -1338,10 +1338,9 @@ type Column example_text_length = Examples.text_column_1.text_right 5 text_right self (n : Column | Integer) -> Column = - Value_Type.expect_text self <| - Value_Type.expect_integer n <| - new_name = naming_helper.function_name "text_right" [self, n] - run_vectorized_binary_op self Java_Storage.Maps.TEXT_RIGHT n new_name + Value_Type.expect_text self <| Value_Type.expect_integer n <| + new_name = naming_helper.function_name "text_right" [self, n] + _apply_case_sensitive_text_operation self n ..Default TextPartOperation.RIGHT (a -> b -> a.take (..Last b)) new_name ## GROUP Standard.Base.Logical ICON preparation