@@ -30,7 +30,6 @@ from project.Internal.Column_Format import all
30
30
from project.Internal.Java_Exports import make_date_builder_adapter, make_double_builder, make_long_builder, make_string_builder
31
31
32
32
polyglot java import org.enso.base.Time_Utils
33
- polyglot java import org.enso.table.data.column.builder.StringBuilder
34
33
polyglot java import org.enso.table.data.column.operation.map.MapOperationProblemBuilder
35
34
polyglot java import org.enso.table.data.column.storage.Storage as Java_Storage
36
35
polyglot java import org.enso.table.data.table.Column as Java_Column
@@ -388,6 +387,15 @@ type Column
388
387
Returns a column with results of adding `other` from each element of
389
388
`self`.
390
389
390
+ ? Arithmetic Overflow
391
+
392
+ For integer columns, the operation may yield results that will not fit
393
+ into the range supported by the column. In such case, the in-memory
394
+ backend will replace such results with `Nothing` and report a
395
+ `Arithmetic_Overflow` warning. The behaviour in Database backends is
396
+ not specified and will depend on the particular database - it may
397
+ cause a hard error, the value may be truncated or wrap-around etc.
398
+
391
399
> Example
392
400
Add two columns to each other.
393
401
@@ -418,6 +426,15 @@ type Column
418
426
Returns a column with results of subtracting `other` from each element of
419
427
`self`.
420
428
429
+ ? Arithmetic Overflow
430
+
431
+ For integer columns, the operation may yield results that will not fit
432
+ into the range supported by the column. In such case, the in-memory
433
+ backend will replace such results with `Nothing` and report a
434
+ `Arithmetic_Overflow` warning. The behaviour in Database backends is
435
+ not specified and will depend on the particular database - it may
436
+ cause a hard error, the value may be truncated or wrap-around etc.
437
+
421
438
> Example
422
439
Subtract one column from another.
423
440
@@ -461,6 +478,15 @@ type Column
461
478
Returns a column containing the result of multiplying each element of
462
479
`self` by `other`.
463
480
481
+ ? Arithmetic Overflow
482
+
483
+ For integer columns, the operation may yield results that will not fit
484
+ into the range supported by the column. In such case, the in-memory
485
+ backend will replace such results with `Nothing` and report a
486
+ `Arithmetic_Overflow` warning. The behaviour in Database backends is
487
+ not specified and will depend on the particular database - it may
488
+ cause a hard error, the value may be truncated or wrap-around etc.
489
+
464
490
> Example
465
491
Multiply the elements of two columns together.
466
492
@@ -495,6 +521,15 @@ type Column
495
521
- If division by zero occurs, an `Arithmetic_Error` warning is attached
496
522
to the result.
497
523
524
+ ? Arithmetic Overflow
525
+
526
+ For integer columns, the operation may yield results that will not fit
527
+ into the range supported by the column. In such case, the in-memory
528
+ backend will replace such results with `Nothing` and report a
529
+ `Arithmetic_Overflow` warning. The behaviour in Database backends is
530
+ not specified and will depend on the particular database - it may
531
+ cause a hard error, the value may be truncated or wrap-around etc.
532
+
498
533
> Example
499
534
Divide the elements of one column by the elements of another.
500
535
@@ -560,6 +595,15 @@ type Column
560
595
Returns a column containing the result of raising each element of `self`
561
596
by `other`.
562
597
598
+ ? Arithmetic Overflow
599
+
600
+ For integer columns, the operation may yield results that will not fit
601
+ into the range supported by the column. In such case, the in-memory
602
+ backend will replace such results with `Nothing` and report a
603
+ `Arithmetic_Overflow` warning. The behaviour in Database backends is
604
+ not specified and will depend on the particular database - it may
605
+ cause a hard error, the value may be truncated or wrap-around etc.
606
+
563
607
> Example
564
608
Squares the elements of one column.
565
609
@@ -1229,7 +1273,7 @@ type Column
1229
1273
length = self.length
1230
1274
storage = self.java_column.getStorage
1231
1275
1232
- builder = StringBuilder.new length
1276
+ builder = make_string_builder length
1233
1277
0.up_to length . each i->
1234
1278
replaced = do_replace i (storage.getItem i)
1235
1279
builder.append replaced
0 commit comments