Skip to content

Commit ac4672e

Browse files
committed
PR comments.
1 parent f5ddd97 commit ac4672e

File tree

6 files changed

+98
-69
lines changed

6 files changed

+98
-69
lines changed

std-bits/table/src/main/java/org/enso/table/data/column/operation/StorageIterators.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ private static <B extends BuilderForType<T>, T> ColumnStorage<T> buildOverLongAr
191191
LongBuildOperation<B> operation) {
192192
var data = source.getArray();
193193
Context context = Context.getCurrent();
194-
assert source.getSize() < Integer.MAX_VALUE;
194+
assert source.getSize() <= Integer.MAX_VALUE;
195195
for (int i = 0; i < source.getSize(); i++) {
196196
boolean isNothing = source.isNothing(i);
197197
if (preserveNothing && isNothing) {
@@ -265,7 +265,7 @@ private static <B extends BuilderForType<T>, T> ColumnStorage<T> buildOverDouble
265265
DoubleBuildOperation<B> operation) {
266266
var data = source.getArray();
267267
Context context = Context.getCurrent();
268-
assert source.getSize() < Integer.MAX_VALUE;
268+
assert source.getSize() <= Integer.MAX_VALUE;
269269
for (int i = 0; i < source.getSize(); i++) {
270270
boolean isNothing = source.isNothing(i);
271271
if (preserveNothing && isNothing) {
@@ -455,7 +455,7 @@ private static <T> ColumnStorage<T> mapOverLongArrayStorage(
455455
LongMapOperation<T> operation) {
456456
var data = source.getArray();
457457
Context context = Context.getCurrent();
458-
assert source.getSize() < Integer.MAX_VALUE;
458+
assert source.getSize() <= Integer.MAX_VALUE;
459459
for (int index = 0; index < source.getSize(); index++) {
460460
if (preserveNothing && source.isNothing(index)) {
461461
builder.appendNulls(1);
@@ -526,7 +526,7 @@ private static <T> ColumnStorage<T> mapOverDoubleArrayStorage(
526526
DoubleMapOperation<T> operation) {
527527
var data = source.getArray();
528528
Context context = Context.getCurrent();
529-
assert source.getSize() < Integer.MAX_VALUE;
529+
assert source.getSize() <= Integer.MAX_VALUE;
530530
for (int index = 0; index < source.getSize(); index++) {
531531
if (preserveNothing && source.isNothing(index)) {
532532
builder.appendNulls(1);
@@ -713,7 +713,7 @@ private static <T> ColumnStorage<T> zipOverLongArrayStorages(
713713
long size2 = source2.getSize();
714714

715715
long size = Math.max(size1, size2);
716-
assert size < Integer.MAX_VALUE;
716+
assert size <= Integer.MAX_VALUE;
717717
var builder = builderConstructor.apply(size);
718718

719719
Context context = Context.getCurrent();
@@ -800,7 +800,7 @@ private static <T> ColumnStorage<T> zipOverDoubleArrayStorages(
800800
long size2 = source2.getSize();
801801

802802
long size = Math.max(size1, size2);
803-
assert size < Integer.MAX_VALUE;
803+
assert size <= Integer.MAX_VALUE;
804804
var builder = builderConstructor.apply(size);
805805

806806
Context context = Context.getCurrent();

std-bits/table/src/main/java/org/enso/table/data/column/operation/map/numeric/arithmetic/NumericBinaryOpImplementation.java

Lines changed: 37 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77
import org.enso.table.data.column.operation.StorageIterators;
88
import org.enso.table.data.column.operation.map.BinaryMapOperation;
99
import org.enso.table.data.column.operation.map.MapOperationProblemAggregator;
10-
import org.enso.table.data.column.storage.*;
10+
import org.enso.table.data.column.storage.ColumnDoubleStorage;
11+
import org.enso.table.data.column.storage.ColumnLongStorage;
12+
import org.enso.table.data.column.storage.ColumnStorage;
13+
import org.enso.table.data.column.storage.ColumnStorageFacade;
14+
import org.enso.table.data.column.storage.Storage;
1115
import org.enso.table.data.column.storage.numeric.BigDecimalStorage;
1216
import org.enso.table.data.column.storage.numeric.BigIntegerStorage;
1317
import org.enso.table.data.column.storage.numeric.DoubleStorage;
@@ -20,6 +24,21 @@
2024
/** An operation expecting a numeric argument and returning a numeric column. */
2125
public abstract class NumericBinaryOpImplementation<T extends Number, I extends Storage<? super T>>
2226
extends BinaryMapOperation<T, I> {
27+
public static ColumnStorage<BigDecimal> asBigDecimal(ColumnStorage<BigInteger> storage) {
28+
return new ColumnStorageFacade<>(storage, BigDecimal::new);
29+
}
30+
31+
public static ColumnStorage<BigDecimal> asBigDecimal(ColumnDoubleStorage storage) {
32+
return new ColumnStorageFacade<>(storage, BigDecimal::valueOf);
33+
}
34+
35+
public static ColumnStorage<BigDecimal> asBigDecimal(ColumnLongStorage storage) {
36+
return new ColumnStorageFacade<>(storage, BigDecimal::valueOf);
37+
}
38+
39+
public static ColumnStorage<BigInteger> asBigInteger(ColumnLongStorage storage) {
40+
return new ColumnStorageFacade<>(storage, BigInteger::valueOf);
41+
}
2342

2443
protected abstract double doDouble(
2544
double a, double b, long ix, MapOperationProblemAggregator problemAggregator);
@@ -76,20 +95,17 @@ public Storage<?> runBinaryMap(
7695
case BigDecimalStorage s -> runBigDecimalMap(
7796
s, BigDecimal.valueOf(argAsDouble), problemAggregator);
7897
case BigIntegerStorage s -> runDoubleMap(
79-
new DoubleStorageFacade<>(s, BigInteger::doubleValue), argAsDouble, problemAggregator);
98+
DoubleStorageFacade.forBigInteger(s), argAsDouble, problemAggregator);
8099
case ColumnDoubleStorage s -> runDoubleMap(s, argAsDouble, problemAggregator);
81100
case ColumnLongStorage s -> runDoubleLongMap(s, argAsDouble, problemAggregator);
82101
default -> throw newUnsupported(storage);
83102
};
84103
} else if (arg instanceof BigDecimal bd) {
85104
return switch (storage) {
86105
case BigDecimalStorage s -> runBigDecimalMap(s, bd, problemAggregator);
87-
case BigIntegerStorage s -> runBigDecimalMap(
88-
new ColumnStorageFacade<>(s, BigDecimal::new), bd, problemAggregator);
89-
case ColumnDoubleStorage s -> runBigDecimalMap(
90-
new ColumnStorageFacade<>(s, BigDecimal::valueOf), bd, problemAggregator);
91-
case ColumnLongStorage s -> runBigDecimalMap(
92-
new ColumnStorageFacade<>(s, BigDecimal::valueOf), bd, problemAggregator);
106+
case BigIntegerStorage s -> runBigDecimalMap(asBigDecimal(s), bd, problemAggregator);
107+
case ColumnDoubleStorage s -> runBigDecimalMap(asBigDecimal(s), bd, problemAggregator);
108+
case ColumnLongStorage s -> runBigDecimalMap(asBigDecimal(s), bd, problemAggregator);
93109
default -> throw newUnsupported(storage);
94110
};
95111
} else {
@@ -102,46 +118,38 @@ public Storage<? extends Number> runZip(
102118
I storage, Storage<?> arg, MapOperationProblemAggregator problemAggregator) {
103119
if (storage instanceof ColumnDoubleStorage lhs) {
104120
return switch (arg) {
105-
case BigDecimalStorage rhs -> runBigDecimalZip(
106-
new ColumnStorageFacade<>(lhs, BigDecimal::valueOf), rhs, problemAggregator);
121+
case BigDecimalStorage rhs -> runBigDecimalZip(asBigDecimal(lhs), rhs, problemAggregator);
107122
case BigIntegerStorage rhs -> runDoubleZip(
108-
lhs, new DoubleStorageFacade<>(rhs, BigInteger::doubleValue), problemAggregator);
123+
lhs, DoubleStorageFacade.forBigInteger(rhs), problemAggregator);
109124
case ColumnDoubleStorage rhs -> runDoubleZip(lhs, rhs, problemAggregator);
110125
case ColumnLongStorage rhs -> runDoubleZip(
111-
lhs, new DoubleStorageFacade<>(rhs, Long::doubleValue), problemAggregator);
126+
lhs, DoubleStorageFacade.forLong(rhs), problemAggregator);
112127
default -> throw newUnsupported(arg);
113128
};
114129
} else if (storage instanceof ColumnLongStorage lhs) {
115130
return switch (arg) {
116-
case BigDecimalStorage rhs -> runBigDecimalZip(
117-
new ColumnStorageFacade<>(lhs, BigDecimal::valueOf), rhs, problemAggregator);
118-
case BigIntegerStorage rhs -> runBigIntegerZip(
119-
new ColumnStorageFacade<>(lhs, BigInteger::valueOf), rhs, problemAggregator);
131+
case BigDecimalStorage rhs -> runBigDecimalZip(asBigDecimal(lhs), rhs, problemAggregator);
132+
case BigIntegerStorage rhs -> runBigIntegerZip(asBigInteger(lhs), rhs, problemAggregator);
120133
case ColumnDoubleStorage rhs -> runDoubleZip(
121-
new DoubleStorageFacade<>(lhs, Long::doubleValue), rhs, problemAggregator);
134+
DoubleStorageFacade.forLong(lhs), rhs, problemAggregator);
122135
case ColumnLongStorage rhs -> runLongZip(lhs, rhs, problemAggregator);
123136
default -> throw newUnsupported(arg);
124137
};
125138
} else if (storage instanceof BigIntegerStorage lhs) {
126139
return switch (arg) {
127-
case BigDecimalStorage rhs -> runBigDecimalZip(
128-
new ColumnStorageFacade<>(lhs, BigDecimal::new), rhs, problemAggregator);
140+
case BigDecimalStorage rhs -> runBigDecimalZip(asBigDecimal(lhs), rhs, problemAggregator);
129141
case BigIntegerStorage rhs -> runBigIntegerZip(lhs, rhs, problemAggregator);
130142
case ColumnDoubleStorage rhs -> runDoubleZip(
131-
new DoubleStorageFacade<>(lhs, BigInteger::doubleValue), rhs, problemAggregator);
132-
case ColumnLongStorage rhs -> runBigIntegerZip(
133-
lhs, new ColumnStorageFacade<>(rhs, BigInteger::valueOf), problemAggregator);
143+
DoubleStorageFacade.forBigInteger(lhs), rhs, problemAggregator);
144+
case ColumnLongStorage rhs -> runBigIntegerZip(lhs, asBigInteger(rhs), problemAggregator);
134145
default -> throw newUnsupported(arg);
135146
};
136147
} else if (storage instanceof BigDecimalStorage lhs) {
137148
return switch (arg) {
138149
case BigDecimalStorage rhs -> runBigDecimalZip(lhs, rhs, problemAggregator);
139-
case BigIntegerStorage rhs -> runBigDecimalZip(
140-
lhs, new ColumnStorageFacade<>(rhs, BigDecimal::new), problemAggregator);
141-
case ColumnDoubleStorage rhs -> runBigDecimalZip(
142-
lhs, new ColumnStorageFacade<>(rhs, BigDecimal::valueOf), problemAggregator);
143-
case ColumnLongStorage rhs -> runBigDecimalZip(
144-
lhs, new ColumnStorageFacade<>(rhs, BigDecimal::valueOf), problemAggregator);
150+
case BigIntegerStorage rhs -> runBigDecimalZip(lhs, asBigDecimal(rhs), problemAggregator);
151+
case ColumnDoubleStorage rhs -> runBigDecimalZip(lhs, asBigDecimal(rhs), problemAggregator);
152+
case ColumnLongStorage rhs -> runBigDecimalZip(lhs, asBigDecimal(rhs), problemAggregator);
145153
default -> throw newUnsupported(arg);
146154
};
147155
} else {
@@ -155,8 +163,7 @@ private static Storage<? extends Number> allNullStorageOfSameType(Storage<?> sto
155163
case BigIntegerStorage s -> BigIntegerStorage.makeEmpty(storage.getSize());
156164
case BigDecimalStorage s -> BigDecimalStorage.makeEmpty(storage.getSize());
157165
case ColumnDoubleStorage s -> DoubleStorage.makeEmpty(storage.getSize());
158-
default -> throw new IllegalStateException(
159-
"Unsupported storage: " + storage.getClass().getCanonicalName());
166+
default -> throw newUnsupported(storage);
160167
};
161168
}
162169

std-bits/table/src/main/java/org/enso/table/data/column/operation/map/numeric/arithmetic/NumericBinaryOpReturningBigDecimal.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
import org.enso.table.data.column.storage.numeric.BigDecimalStorage;
1111
import org.enso.table.data.column.storage.numeric.BigIntegerStorage;
1212

13+
import static org.enso.table.data.column.operation.map.numeric.arithmetic.NumericBinaryOpImplementation.asBigDecimal;
14+
1315
public abstract class NumericBinaryOpReturningBigDecimal<
1416
T extends Number, I extends Storage<? super T>>
1517
extends BinaryMapOperation<T, I> {
@@ -19,10 +21,10 @@ public NumericBinaryOpReturningBigDecimal(String name) {
1921

2022
private static ColumnStorage<BigDecimal> asBigDecimalStorage(Storage<?> storage) {
2123
return switch (storage) {
22-
case ColumnDoubleStorage s -> new ColumnStorageFacade<>(s, BigDecimal::valueOf);
23-
case ColumnLongStorage s -> new ColumnStorageFacade<>(s, BigDecimal::valueOf);
24+
case ColumnDoubleStorage s -> asBigDecimal(s);
25+
case ColumnLongStorage s -> asBigDecimal(s);
2426
case BigDecimalStorage s -> s;
25-
case BigIntegerStorage s -> new ColumnStorageFacade<>(s, BigDecimal::new);
27+
case BigIntegerStorage s -> asBigDecimal(s);
2628
default -> throw NumericBinaryOpImplementation.newUnsupported(storage);
2729
};
2830
}

std-bits/table/src/main/java/org/enso/table/data/column/operation/map/numeric/arithmetic/NumericBinaryOpReturningDouble.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ public NumericBinaryOpReturningDouble(String name) {
2727
private static ColumnDoubleStorage asDoubleStorage(Storage<?> storage) {
2828
return switch (storage) {
2929
case ColumnDoubleStorage s -> s;
30-
case ColumnLongStorage s -> new DoubleStorageFacade<>(s, Long::doubleValue);
31-
case BigDecimalStorage s -> new DoubleStorageFacade<>(s, BigDecimal::doubleValue);
32-
case BigIntegerStorage s -> new DoubleStorageFacade<>(s, BigInteger::doubleValue);
30+
case ColumnLongStorage s -> DoubleStorageFacade.forLong(s);
31+
case BigDecimalStorage s -> DoubleStorageFacade.forBigDecimal(s);
32+
case BigIntegerStorage s -> DoubleStorageFacade.forBigInteger(s);
3333
default -> throw NumericBinaryOpImplementation.newUnsupported(storage);
3434
};
3535
}

std-bits/table/src/main/java/org/enso/table/data/column/operation/map/numeric/comparisons/NumericComparison.java

Lines changed: 19 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
import org.enso.table.data.column.storage.numeric.BigIntegerStorage;
1919
import org.enso.table.data.column.storage.numeric.DoubleStorageFacade;
2020

21+
import static org.enso.table.data.column.operation.map.numeric.arithmetic.NumericBinaryOpImplementation.asBigDecimal;
22+
import static org.enso.table.data.column.operation.map.numeric.arithmetic.NumericBinaryOpImplementation.asBigInteger;
23+
2124
public abstract class NumericComparison<T extends Number, I extends Storage<? super T>>
2225
extends BinaryMapOperation<T, I> {
2326

@@ -60,12 +63,9 @@ public Storage<Boolean> runBinaryMap(
6063
} else if (arg instanceof BigDecimal bigDecimal) {
6164
return switch (storage) {
6265
case BigDecimalStorage s -> runBigDecimalMap(s, bigDecimal, problemAggregator);
63-
case BigIntegerStorage s -> runBigDecimalMap(
64-
new ColumnStorageFacade<>(s, BigDecimal::new), bigDecimal, problemAggregator);
65-
case ColumnDoubleStorage s -> runBigDecimalMap(
66-
new ColumnStorageFacade<>(s, BigDecimal::valueOf), bigDecimal, problemAggregator);
67-
case ColumnLongStorage s -> runBigDecimalMap(
68-
new ColumnStorageFacade<>(s, BigDecimal::valueOf), bigDecimal, problemAggregator);
66+
case BigIntegerStorage s -> runBigDecimalMap(asBigDecimal(s), bigDecimal, problemAggregator);
67+
case ColumnDoubleStorage s -> runBigDecimalMap(asBigDecimal(s), bigDecimal, problemAggregator);
68+
case ColumnLongStorage s -> runBigDecimalMap(asBigDecimal(s), bigDecimal, problemAggregator);
6969
default -> throw newUnsupported(storage);
7070
};
7171
} else if (NumericConverter.isCoercibleToLong(arg)) {
@@ -85,7 +85,7 @@ public Storage<Boolean> runBinaryMap(
8585
case BigDecimalStorage s -> runBigDecimalMap(
8686
s, BigDecimal.valueOf(argAsDouble), problemAggregator);
8787
case BigIntegerStorage s -> runDoubleMap(
88-
new DoubleStorageFacade<>(s, BigInteger::doubleValue), argAsDouble, problemAggregator);
88+
DoubleStorageFacade.forBigInteger(s), argAsDouble, problemAggregator);
8989
case ColumnDoubleStorage s -> runDoubleMap(s, argAsDouble, problemAggregator);
9090
case ColumnLongStorage s -> runDoubleLongMap(s, argAsDouble, problemAggregator);
9191
default -> throw newUnsupported(storage);
@@ -172,46 +172,38 @@ public Storage<Boolean> runZip(
172172
I storage, Storage<?> arg, MapOperationProblemAggregator problemAggregator) {
173173
if (storage instanceof ColumnDoubleStorage lhs) {
174174
return switch (arg) {
175-
case BigDecimalStorage rhs -> runBigDecimalZip(
176-
new ColumnStorageFacade<>(lhs, BigDecimal::valueOf), rhs, problemAggregator);
175+
case BigDecimalStorage rhs -> runBigDecimalZip(asBigDecimal(lhs), rhs, problemAggregator);
177176
case BigIntegerStorage rhs -> runDoubleZip(
178-
lhs, new DoubleStorageFacade<>(rhs, BigInteger::doubleValue), problemAggregator);
177+
lhs, DoubleStorageFacade.forBigInteger(rhs), problemAggregator);
179178
case ColumnDoubleStorage rhs -> runDoubleZip(lhs, rhs, problemAggregator);
180179
case ColumnLongStorage rhs -> runDoubleZip(
181-
lhs, new DoubleStorageFacade<>(rhs, Long::doubleValue), problemAggregator);
180+
lhs, DoubleStorageFacade.forLong(rhs), problemAggregator);
182181
default -> runMixedZip(storage, arg, problemAggregator);
183182
};
184183
} else if (storage instanceof ColumnLongStorage lhs) {
185184
return switch (arg) {
186-
case BigDecimalStorage rhs -> runBigDecimalZip(
187-
new ColumnStorageFacade<>(lhs, BigDecimal::valueOf), rhs, problemAggregator);
188-
case BigIntegerStorage rhs -> runBigIntegerZip(
189-
new ColumnStorageFacade<>(lhs, BigInteger::valueOf), rhs, problemAggregator);
185+
case BigDecimalStorage rhs -> runBigDecimalZip(asBigDecimal(lhs), rhs, problemAggregator);
186+
case BigIntegerStorage rhs -> runBigIntegerZip(asBigInteger(lhs), rhs, problemAggregator);
190187
case ColumnDoubleStorage rhs -> runDoubleZip(
191-
new DoubleStorageFacade<>(lhs, Long::doubleValue), rhs, problemAggregator);
188+
DoubleStorageFacade.forLong(lhs), rhs, problemAggregator);
192189
case ColumnLongStorage rhs -> runLongZip(lhs, rhs, problemAggregator);
193190
default -> runMixedZip(storage, arg, problemAggregator);
194191
};
195192
} else if (storage instanceof BigIntegerStorage lhs) {
196193
return switch (arg) {
197-
case BigDecimalStorage rhs -> runBigDecimalZip(
198-
new ColumnStorageFacade<>(lhs, BigDecimal::new), rhs, problemAggregator);
194+
case BigDecimalStorage rhs -> runBigDecimalZip(asBigDecimal(lhs), rhs, problemAggregator);
199195
case BigIntegerStorage rhs -> runBigIntegerZip(lhs, rhs, problemAggregator);
200196
case ColumnDoubleStorage rhs -> runDoubleZip(
201-
new DoubleStorageFacade<>(lhs, BigInteger::doubleValue), rhs, problemAggregator);
202-
case ColumnLongStorage rhs -> runBigIntegerZip(
203-
lhs, new ColumnStorageFacade<>(rhs, BigInteger::valueOf), problemAggregator);
197+
DoubleStorageFacade.forBigInteger(lhs), rhs, problemAggregator);
198+
case ColumnLongStorage rhs -> runBigIntegerZip(lhs, asBigInteger(rhs), problemAggregator);
204199
default -> runMixedZip(storage, arg, problemAggregator);
205200
};
206201
} else if (storage instanceof BigDecimalStorage lhs) {
207202
return switch (arg) {
208203
case BigDecimalStorage rhs -> runBigDecimalZip(lhs, rhs, problemAggregator);
209-
case BigIntegerStorage rhs -> runBigDecimalZip(
210-
lhs, new ColumnStorageFacade<>(rhs, BigDecimal::new), problemAggregator);
211-
case ColumnDoubleStorage rhs -> runBigDecimalZip(
212-
lhs, new ColumnStorageFacade<>(rhs, BigDecimal::valueOf), problemAggregator);
213-
case ColumnLongStorage rhs -> runBigDecimalZip(
214-
lhs, new ColumnStorageFacade<>(rhs, BigDecimal::valueOf), problemAggregator);
204+
case BigIntegerStorage rhs -> runBigDecimalZip(lhs, asBigDecimal(rhs), problemAggregator);
205+
case ColumnDoubleStorage rhs -> runBigDecimalZip(lhs, asBigDecimal(rhs), problemAggregator);
206+
case ColumnLongStorage rhs -> runBigDecimalZip(lhs, asBigDecimal(rhs), problemAggregator);
215207
default -> runMixedZip(storage, arg, problemAggregator);
216208
};
217209
} else {

std-bits/table/src/main/java/org/enso/table/data/column/storage/numeric/DoubleStorageFacade.java

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
package org.enso.table.data.column.storage.numeric;
22

3+
import java.math.BigDecimal;
4+
import java.math.BigInteger;
35
import java.util.function.ToDoubleFunction;
46
import org.enso.table.data.column.storage.ColumnDoubleStorage;
7+
import org.enso.table.data.column.storage.ColumnLongStorage;
58
import org.enso.table.data.column.storage.ColumnStorage;
69
import org.enso.table.data.column.storage.ValueIsNothingException;
710
import org.enso.table.data.column.storage.type.FloatType;
@@ -17,6 +20,31 @@ public DoubleStorageFacade(ColumnStorage<T> parent, ToDoubleFunction<T> converte
1720
this.converter = converter;
1821
}
1922

23+
public static ColumnDoubleStorage forLong(ColumnLongStorage parent) {
24+
return new DoubleStorageFacade<>(parent, Long::doubleValue) {
25+
@Override
26+
public double getItemAsDouble(long index) throws ValueIsNothingException {
27+
return (double)parent.getItemAsLong(index);
28+
}
29+
30+
@Override
31+
public Double getItemBoxed(long index) {
32+
if (isNothing(index)) {
33+
return null;
34+
}
35+
return getItemAsDouble(index);
36+
}
37+
};
38+
}
39+
40+
public static ColumnDoubleStorage forBigInteger(ColumnStorage<BigInteger> parent) {
41+
return new DoubleStorageFacade<>(parent, BigInteger::doubleValue);
42+
}
43+
44+
public static ColumnDoubleStorage forBigDecimal(ColumnStorage<BigDecimal> parent) {
45+
return new DoubleStorageFacade<>(parent, BigDecimal::doubleValue);
46+
}
47+
2048
@Override
2149
public double getItemAsDouble(long index) throws ValueIsNothingException {
2250
if (isNothing(index)) {

0 commit comments

Comments
 (0)