diff --git a/std-bits/table/src/main/java/org/enso/table/data/column/storage/MixedStorage.java b/std-bits/table/src/main/java/org/enso/table/data/column/storage/MixedStorage.java index c5286c82729d..ce0e7ef854bd 100644 --- a/std-bits/table/src/main/java/org/enso/table/data/column/storage/MixedStorage.java +++ b/std-bits/table/src/main/java/org/enso/table/data/column/storage/MixedStorage.java @@ -114,7 +114,8 @@ public StorageType inferPreciseTypeShrunk() { return AnyObjectType.INSTANCE; } - // If we are able to get a more specialized storage for more specific type - we delegate to its own shrinking logic. + // If we are able to get a more specialized storage for more specific type - we delegate to its + // own shrinking logic. return specialized.inferPreciseTypeShrunk(); } diff --git a/std-bits/table/src/main/java/org/enso/table/data/column/storage/Storage.java b/std-bits/table/src/main/java/org/enso/table/data/column/storage/Storage.java index b5862940cbd7..adc67afcb558 100644 --- a/std-bits/table/src/main/java/org/enso/table/data/column/storage/Storage.java +++ b/std-bits/table/src/main/java/org/enso/table/data/column/storage/Storage.java @@ -40,13 +40,13 @@ public StorageType inferPreciseType() { } /** - * Returns the smallest type (according to Column.auto_value_type rules) that may still fit all values in this - * column. - *
- * It is a sibling of `inferPreciseType` that allows some further shrinking. It is kept separate, because - * `inferPreciseType` should be quick to compute (cached if needed) as it is used in typechecking of lots of - * operations. This one however, is only used in a specific `auto_value_type` use-case and rarely will need to be - * computed more than once. + * Returns the smallest type (according to Column.auto_value_type rules) that may still fit all + * values in this column. + * + *
It is a sibling of `inferPreciseType` that allows some further shrinking. It is kept
+ * separate, because `inferPreciseType` should be quick to compute (cached if needed) as it is
+ * used in typechecking of lots of operations. This one however, is only used in a specific
+ * `auto_value_type` use-case and rarely will need to be computed more than once.
*/
public StorageType inferPreciseTypeShrunk() {
return getType();
diff --git a/std-bits/table/src/main/java/org/enso/table/data/column/storage/numeric/AbstractLongStorage.java b/std-bits/table/src/main/java/org/enso/table/data/column/storage/numeric/AbstractLongStorage.java
index cb25574b4836..04a00bf8b00b 100644
--- a/std-bits/table/src/main/java/org/enso/table/data/column/storage/numeric/AbstractLongStorage.java
+++ b/std-bits/table/src/main/java/org/enso/table/data/column/storage/numeric/AbstractLongStorage.java
@@ -1,5 +1,6 @@
package org.enso.table.data.column.storage.numeric;
+import java.util.BitSet;
import org.enso.table.data.column.builder.Builder;
import org.enso.table.data.column.builder.NumericBuilder;
import org.enso.table.data.column.operation.map.MapOperationProblemBuilder;
@@ -25,8 +26,6 @@
import org.enso.table.data.column.storage.type.StorageType;
import org.graalvm.polyglot.Context;
-import java.util.BitSet;
-
public abstract class AbstractLongStorage extends NumericStorage This storage allows for missing values. Prefer {@link ComputedLongStorage} for non-nullable case.
+ * This storage allows for missing values. Prefer {@link ComputedLongStorage} for non-nullable
+ * case.
*/
public abstract class ComputedNullableLongStorage extends AbstractLongStorage {
protected final int size;
diff --git a/std-bits/table/src/main/java/org/enso/table/data/column/storage/numeric/DoubleStorage.java b/std-bits/table/src/main/java/org/enso/table/data/column/storage/numeric/DoubleStorage.java
index 5d3aba45996e..8159aac377dc 100644
--- a/std-bits/table/src/main/java/org/enso/table/data/column/storage/numeric/DoubleStorage.java
+++ b/std-bits/table/src/main/java/org/enso/table/data/column/storage/numeric/DoubleStorage.java
@@ -435,18 +435,20 @@ private StorageType findSmallestIntegerTypeThatFits() {
final DoubleStorage parent = this;
// We create a Long storage that gets values by converting our storage.
- ComputedNullableLongStorage longAdapter = new ComputedNullableLongStorage(size) {
- @Override
- protected Long computeItem(int idx) {
- if (parent.isNa(idx)) {
- return null;
- }
-
- double value = parent.getItem(idx);
- assert value % 1.0 == 0.0 : "The value " + value + " should be a whole number (guaranteed by checks).";
- return (long) value;
- }
- };
+ ComputedNullableLongStorage longAdapter =
+ new ComputedNullableLongStorage(size) {
+ @Override
+ protected Long computeItem(int idx) {
+ if (parent.isNa(idx)) {
+ return null;
+ }
+
+ double value = parent.getItem(idx);
+ assert value % 1.0 == 0.0
+ : "The value " + value + " should be a whole number (guaranteed by checks).";
+ return (long) value;
+ }
+ };
// And rely on its shrinking logic.
return longAdapter.inferPreciseTypeShrunk();