Skip to content

Commit 1276081

Browse files
authored
OfTypeValue distinguishes long and int (#3448)
With #3434 we added support for `long` and `int` literal suffixes, this uncovered limitation in the way `OfTypeValue` works such that it does not distinguish between `int` and `long`. This PR addresses that problem and enables `OfTypeValue` to distinguish between `long` and `int` correctly. This fixes #3447.
1 parent 502b934 commit 1276081

File tree

6 files changed

+234
-43
lines changed

6 files changed

+234
-43
lines changed

fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/query/plan/cascades/values/OfTypeValue.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,25 @@ public <M extends Message> Boolean eval(@Nullable final FDBRecordStoreBase<M> st
9494
return expectedType.isRecord();
9595
}
9696
final var type = Type.fromObject(value);
97+
98+
if (type.isPrimitive() && expectedType.isPrimitive() && type.getTypeCode() != Type.TypeCode.NULL) {
99+
return type.nullable().equals(expectedType.nullable());
100+
}
101+
97102
final var promotionNeeded = PromoteValue.isPromotionNeeded(type, expectedType);
98103
if (!promotionNeeded) {
99104
return true;
100105
}
106+
101107
return PromoteValue.resolvePhysicalOperator(type, expectedType) != null;
102108
}
103109

110+
@Nullable
111+
@Override
112+
public Boolean evalWithoutStore(@Nonnull final EvaluationContext context) {
113+
return eval(null, context);
114+
}
115+
104116
@Override
105117
@SpotBugsSuppressWarnings("EQ_UNUSUAL")
106118
@SuppressWarnings("EqualsWhichDoesntCheckParameterClass")
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
/*
2+
* OfTypeValueTest.java
3+
*
4+
* This source file is part of the FoundationDB open source project
5+
*
6+
* Copyright 2015-2025 Apple Inc. and the FoundationDB project authors
7+
*
8+
* Licensed under the Apache License, Version 2.0 (the "License");
9+
* you may not use this file except in compliance with the License.
10+
* You may obtain a copy of the License at
11+
*
12+
* http://www.apache.org/licenses/LICENSE-2.0
13+
*
14+
* Unless required by applicable law or agreed to in writing, software
15+
* distributed under the License is distributed on an "AS IS" BASIS,
16+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
* See the License for the specific language governing permissions and
18+
* limitations under the License.
19+
*/
20+
21+
package com.apple.foundationdb.record.query.plan.cascades;
22+
23+
import com.apple.foundationdb.record.EvaluationContext;
24+
import com.apple.foundationdb.record.query.plan.cascades.typing.Type;
25+
import com.apple.foundationdb.record.query.plan.cascades.values.LiteralValue;
26+
import com.apple.foundationdb.record.query.plan.cascades.values.OfTypeValue;
27+
import org.assertj.core.api.Assertions;
28+
import org.junit.jupiter.api.Test;
29+
30+
/**
31+
* Tests for {@link OfTypeValue} and its ability to distinguish between {@code long} and {@code int}, as well as
32+
* {@code float} and {@code double}.
33+
*/
34+
public class OfTypeValueTest {
35+
36+
@Test
37+
void ofTypeIntWorksCorrectly() {
38+
final var intValue = LiteralValue.ofScalar(42);
39+
Assertions.assertThat(
40+
OfTypeValue.of(intValue, Type.primitiveType(Type.TypeCode.INT))
41+
.evalWithoutStore(EvaluationContext.empty()))
42+
.isTrue();
43+
Assertions.assertThat(
44+
OfTypeValue.of(intValue, Type.primitiveType(Type.TypeCode.INT, true))
45+
.evalWithoutStore(EvaluationContext.empty()))
46+
.isTrue();
47+
Assertions.assertThat(
48+
OfTypeValue.of(intValue, Type.primitiveType(Type.TypeCode.LONG))
49+
.evalWithoutStore(EvaluationContext.empty()))
50+
.isFalse();
51+
Assertions.assertThat(
52+
OfTypeValue.of(intValue, Type.primitiveType(Type.TypeCode.LONG, true))
53+
.evalWithoutStore(EvaluationContext.empty()))
54+
.isFalse();
55+
}
56+
57+
@Test
58+
void ofTypeLongWorksCorrectly() {
59+
final var longValue = LiteralValue.ofScalar(42L);
60+
Assertions.assertThat(
61+
OfTypeValue.of(longValue, Type.primitiveType(Type.TypeCode.INT))
62+
.evalWithoutStore(EvaluationContext.empty()))
63+
.isFalse();
64+
Assertions.assertThat(
65+
OfTypeValue.of(longValue, Type.primitiveType(Type.TypeCode.INT, true))
66+
.evalWithoutStore(EvaluationContext.empty()))
67+
.isFalse();
68+
Assertions.assertThat(
69+
OfTypeValue.of(longValue, Type.primitiveType(Type.TypeCode.LONG))
70+
.evalWithoutStore(EvaluationContext.empty()))
71+
.isTrue();
72+
Assertions.assertThat(
73+
OfTypeValue.of(longValue, Type.primitiveType(Type.TypeCode.LONG, true))
74+
.evalWithoutStore(EvaluationContext.empty()))
75+
.isTrue();
76+
}
77+
78+
@Test
79+
void ofTypeFloatWorksCorrectly() {
80+
final var floatValue = LiteralValue.ofScalar(42.5f);
81+
Assertions.assertThat(
82+
OfTypeValue.of(floatValue, Type.primitiveType(Type.TypeCode.FLOAT))
83+
.evalWithoutStore(EvaluationContext.empty()))
84+
.isTrue();
85+
Assertions.assertThat(
86+
OfTypeValue.of(floatValue, Type.primitiveType(Type.TypeCode.FLOAT, true))
87+
.evalWithoutStore(EvaluationContext.empty()))
88+
.isTrue();
89+
Assertions.assertThat(
90+
OfTypeValue.of(floatValue, Type.primitiveType(Type.TypeCode.DOUBLE))
91+
.evalWithoutStore(EvaluationContext.empty()))
92+
.isFalse();
93+
Assertions.assertThat(
94+
OfTypeValue.of(floatValue, Type.primitiveType(Type.TypeCode.DOUBLE, true))
95+
.evalWithoutStore(EvaluationContext.empty()))
96+
.isFalse();
97+
}
98+
99+
@Test
100+
void ofTypeDoubleWorksCorrectly() {
101+
final var doubleValue = LiteralValue.ofScalar(42.5d);
102+
Assertions.assertThat(
103+
OfTypeValue.of(doubleValue, Type.primitiveType(Type.TypeCode.DOUBLE))
104+
.evalWithoutStore(EvaluationContext.empty()))
105+
.isTrue();
106+
Assertions.assertThat(
107+
OfTypeValue.of(doubleValue, Type.primitiveType(Type.TypeCode.DOUBLE, true))
108+
.evalWithoutStore(EvaluationContext.empty()))
109+
.isTrue();
110+
Assertions.assertThat(
111+
OfTypeValue.of(doubleValue, Type.primitiveType(Type.TypeCode.FLOAT))
112+
.evalWithoutStore(EvaluationContext.empty()))
113+
.isFalse();
114+
Assertions.assertThat(
115+
OfTypeValue.of(doubleValue, Type.primitiveType(Type.TypeCode.FLOAT, true))
116+
.evalWithoutStore(EvaluationContext.empty()))
117+
.isFalse();
118+
}
119+
}

yaml-tests/src/test/java/YamlIntegrationTests.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,6 @@ public void sqlFunctionsTest(YamlTest.Runner runner) throws Exception {
285285
}
286286

287287
@TestTemplate
288-
@MaintainYamlTestConfig(YamlTestConfigFilters.CORRECT_EXPLAIN_AND_METRICS)
289288
public void literalTests(YamlTest.Runner runner) throws Exception {
290289
runner.runYamsql("literal-tests.yamsql");
291290
}

yaml-tests/src/test/resources/literal-tests.metrics.binpb

Lines changed: 49 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
1+
22
@
3-
unnamed-33EXPLAIN select * from B where 6L = coalesce(5L, 6L)�
3+
unnamed-33EXPLAIN select * from B where 6L = coalesce(5L, 6L)�
44

5-
�ô�#& ���(0���8@6SCAN(<,>) | FILTER @c6 EQUALS coalesce_long(@c10, @c6)�
5+
����"& ��(0��l8@6SCAN(<,>) | FILTER @c6 EQUALS coalesce_long(@c10, @c6)�
66
digraph G {
77
fontname=courier;
88
rankdir=BT;
@@ -12,10 +12,38 @@ digraph G {
1212
3 [ label=<<table border="0" cellborder="1" cellspacing="0" cellpadding="8"><tr><td align="left">Primary Storage</td></tr><tr><td align="left">record types: [B]</td></tr></table>> color="black" shape="plain" style="filled" fillcolor="lightblue" fontname="courier" fontsize="8" tooltip="RELATION(INT AS B1, )" ];
1313
3 -> 2 [ color="gray20" style="solid" fontname="courier" fontsize="8" arrowhead="normal" arrowtail="none" dir="both" ];
1414
2 -> 1 [ label=<&nbsp;q2> label="q2" color="gray20" style="bold" fontname="courier" fontsize="8" arrowhead="normal" arrowtail="none" dir="both" ];
15-
}�
15+
}�
16+
=
17+
unnamed-30EXPLAIN select * from B where 6 = coalesce(5, 6)�
18+
19+
����& ���(0��08@5SCAN(<,>) | FILTER @c6 EQUALS coalesce_int(@c10, @c6)�
20+
digraph G {
21+
fontname=courier;
22+
rankdir=BT;
23+
splines=polyline;
24+
1 [ label=<<table border="0" cellborder="1" cellspacing="0" cellpadding="8"><tr><td align="left">Predicate Filter</td></tr><tr><td align="left">WHERE @c6 EQUALS coalesce_int(@c10, @c6)</td></tr></table>> color="black" shape="plain" style="solid" fillcolor="black" fontname="courier" fontsize="8" tooltip="RELATION(INT AS B1, )" ];
25+
2 [ label=<<table border="0" cellborder="1" cellspacing="0" cellpadding="8"><tr><td align="left">Scan</td></tr><tr><td align="left">range: &lt;-∞, ∞&gt;</td></tr></table>> color="black" shape="plain" style="solid" fillcolor="black" fontname="courier" fontsize="8" tooltip="RELATION(INT AS B1, )" ];
26+
3 [ label=<<table border="0" cellborder="1" cellspacing="0" cellpadding="8"><tr><td align="left">Primary Storage</td></tr><tr><td align="left">record types: [B]</td></tr></table>> color="black" shape="plain" style="filled" fillcolor="lightblue" fontname="courier" fontsize="8" tooltip="RELATION(INT AS B1, )" ];
27+
3 -> 2 [ color="gray20" style="solid" fontname="courier" fontsize="8" arrowhead="normal" arrowtail="none" dir="both" ];
28+
2 -> 1 [ label=<&nbsp;q2> label="q2" color="gray20" style="bold" fontname="courier" fontsize="8" arrowhead="normal" arrowtail="none" dir="both" ];
29+
}�
30+
@
31+
unnamed-43EXPLAIN select * from B where 6L = coalesce(5L, 6L)�
32+
33+
����"& ��(0��l8@6SCAN(<,>) | FILTER @c6 EQUALS coalesce_long(@c10, @c6)�
34+
digraph G {
35+
fontname=courier;
36+
rankdir=BT;
37+
splines=polyline;
38+
1 [ label=<<table border="0" cellborder="1" cellspacing="0" cellpadding="8"><tr><td align="left">Predicate Filter</td></tr><tr><td align="left">WHERE @c6 EQUALS coalesce_long(@c10, @c6)</td></tr></table>> color="black" shape="plain" style="solid" fillcolor="black" fontname="courier" fontsize="8" tooltip="RELATION(INT AS B1, )" ];
39+
2 [ label=<<table border="0" cellborder="1" cellspacing="0" cellpadding="8"><tr><td align="left">Scan</td></tr><tr><td align="left">range: &lt;-∞, ∞&gt;</td></tr></table>> color="black" shape="plain" style="solid" fillcolor="black" fontname="courier" fontsize="8" tooltip="RELATION(INT AS B1, )" ];
40+
3 [ label=<<table border="0" cellborder="1" cellspacing="0" cellpadding="8"><tr><td align="left">Primary Storage</td></tr><tr><td align="left">record types: [B]</td></tr></table>> color="black" shape="plain" style="filled" fillcolor="lightblue" fontname="courier" fontsize="8" tooltip="RELATION(INT AS B1, )" ];
41+
3 -> 2 [ color="gray20" style="solid" fontname="courier" fontsize="8" arrowhead="normal" arrowtail="none" dir="both" ];
42+
2 -> 1 [ label=<&nbsp;q2> label="q2" color="gray20" style="bold" fontname="courier" fontsize="8" arrowhead="normal" arrowtail="none" dir="both" ];
43+
}�
1644
@
17-
unnamed-33EXPLAIN select * from B where 6L = coalesce(5I, 6I)�
18-
����#& ���(0���8@GSCAN(<,>) | FILTER @c6 EQUALS promote(coalesce_int(@c10, @c12) AS LONG)�
45+
unnamed-43EXPLAIN select * from B where 6L = coalesce(5I, 6I)�
46+
����& ���(0̫A8@GSCAN(<,>) | FILTER @c6 EQUALS promote(coalesce_int(@c10, @c12) AS LONG)�
1947
digraph G {
2048
fontname=courier;
2149
rankdir=BT;
@@ -25,10 +53,10 @@ digraph G {
2553
3 [ label=<<table border="0" cellborder="1" cellspacing="0" cellpadding="8"><tr><td align="left">Primary Storage</td></tr><tr><td align="left">record types: [B]</td></tr></table>> color="black" shape="plain" style="filled" fillcolor="lightblue" fontname="courier" fontsize="8" tooltip="RELATION(INT AS B1, )" ];
2654
3 -> 2 [ color="gray20" style="solid" fontname="courier" fontsize="8" arrowhead="normal" arrowtail="none" dir="both" ];
2755
2 -> 1 [ label=<&nbsp;q2> label="q2" color="gray20" style="bold" fontname="courier" fontsize="8" arrowhead="normal" arrowtail="none" dir="both" ];
28-
}�
56+
}�
2957
>
30-
unnamed-31EXPLAIN select * from B where 6L = coalesce(5, 6)�
31-
����#& �Ѭ(0��8@GSCAN(<,>) | FILTER @c6 EQUALS promote(coalesce_int(@c10, @c12) AS LONG)�
58+
unnamed-41EXPLAIN select * from B where 6L = coalesce(5, 6)�
59+
����& �(0��%8@GSCAN(<,>) | FILTER @c6 EQUALS promote(coalesce_int(@c10, @c12) AS LONG)�
3260
digraph G {
3361
fontname=courier;
3462
rankdir=BT;
@@ -38,10 +66,10 @@ digraph G {
3866
3 [ label=<<table border="0" cellborder="1" cellspacing="0" cellpadding="8"><tr><td align="left">Primary Storage</td></tr><tr><td align="left">record types: [B]</td></tr></table>> color="black" shape="plain" style="filled" fillcolor="lightblue" fontname="courier" fontsize="8" tooltip="RELATION(INT AS B1, )" ];
3967
3 -> 2 [ color="gray20" style="solid" fontname="courier" fontsize="8" arrowhead="normal" arrowtail="none" dir="both" ];
4068
2 -> 1 [ label=<&nbsp;q2> label="q2" color="gray20" style="bold" fontname="courier" fontsize="8" arrowhead="normal" arrowtail="none" dir="both" ];
41-
}�
69+
}�
4270
>
43-
unnamed-31EXPLAIN select * from B where 6 = coalesce(5L, 6)�
44-
����#& ڑ�(0���8@XSCAN(<,>) | FILTER promote(@c6 AS LONG) EQUALS coalesce_long(@c10, promote(@c6 AS LONG))�
71+
unnamed-41EXPLAIN select * from B where 6 = coalesce(5L, 6)�
72+
���& ��(0��88@XSCAN(<,>) | FILTER promote(@c6 AS LONG) EQUALS coalesce_long(@c10, promote(@c6 AS LONG))�
4573
digraph G {
4674
fontname=courier;
4775
rankdir=BT;
@@ -51,10 +79,10 @@ digraph G {
5179
3 [ label=<<table border="0" cellborder="1" cellspacing="0" cellpadding="8"><tr><td align="left">Primary Storage</td></tr><tr><td align="left">record types: [B]</td></tr></table>> color="black" shape="plain" style="filled" fillcolor="lightblue" fontname="courier" fontsize="8" tooltip="RELATION(INT AS B1, )" ];
5280
3 -> 2 [ color="gray20" style="solid" fontname="courier" fontsize="8" arrowhead="normal" arrowtail="none" dir="both" ];
5381
2 -> 1 [ label=<&nbsp;q2> label="q2" color="gray20" style="bold" fontname="courier" fontsize="8" arrowhead="normal" arrowtail="none" dir="both" ];
54-
}�
82+
}�
5583
@
56-
unnamed-33EXPLAIN select * from B where 6I = coalesce(5L, 6I)�
57-
����#& ���(0���8@XSCAN(<,>) | FILTER promote(@c6 AS LONG) EQUALS coalesce_long(@c10, promote(@c6 AS LONG))�
84+
unnamed-43EXPLAIN select * from B where 6I = coalesce(5L, 6I)�
85+
����& ���(0��-8@XSCAN(<,>) | FILTER promote(@c6 AS LONG) EQUALS coalesce_long(@c10, promote(@c6 AS LONG))�
5886
digraph G {
5987
fontname=courier;
6088
rankdir=BT;
@@ -64,10 +92,10 @@ digraph G {
6492
3 [ label=<<table border="0" cellborder="1" cellspacing="0" cellpadding="8"><tr><td align="left">Primary Storage</td></tr><tr><td align="left">record types: [B]</td></tr></table>> color="black" shape="plain" style="filled" fillcolor="lightblue" fontname="courier" fontsize="8" tooltip="RELATION(INT AS B1, )" ];
6593
3 -> 2 [ color="gray20" style="solid" fontname="courier" fontsize="8" arrowhead="normal" arrowtail="none" dir="both" ];
6694
2 -> 1 [ label=<&nbsp;q2> label="q2" color="gray20" style="bold" fontname="courier" fontsize="8" arrowhead="normal" arrowtail="none" dir="both" ];
67-
}�
95+
}�
6896
@
69-
unnamed-33EXPLAIN select * from B where 6i = coalesce(5l, 6i)�
70-
���#& ���(0���8@XSCAN(<,>) | FILTER promote(@c6 AS LONG) EQUALS coalesce_long(@c10, promote(@c6 AS LONG))�
97+
unnamed-43EXPLAIN select * from B where 6i = coalesce(5l, 6i)�
98+
��͠& �ݷ(0��+8@XSCAN(<,>) | FILTER promote(@c6 AS LONG) EQUALS coalesce_long(@c10, promote(@c6 AS LONG))�
7199
digraph G {
72100
fontname=courier;
73101
rankdir=BT;
@@ -77,11 +105,11 @@ digraph G {
77105
3 [ label=<<table border="0" cellborder="1" cellspacing="0" cellpadding="8"><tr><td align="left">Primary Storage</td></tr><tr><td align="left">record types: [B]</td></tr></table>> color="black" shape="plain" style="filled" fillcolor="lightblue" fontname="courier" fontsize="8" tooltip="RELATION(INT AS B1, )" ];
78106
3 -> 2 [ color="gray20" style="solid" fontname="courier" fontsize="8" arrowhead="normal" arrowtail="none" dir="both" ];
79107
2 -> 1 [ label=<&nbsp;q2> label="q2" color="gray20" style="bold" fontname="courier" fontsize="8" arrowhead="normal" arrowtail="none" dir="both" ];
80-
}�
108+
}�
81109
=
82-
unnamed-30EXPLAIN select * from B where 6 = coalesce(5, 6)�
110+
unnamed-40EXPLAIN select * from B where 6 = coalesce(5, 6)�
83111

84-
����#& ��(0���8@5SCAN(<,>) | FILTER @c6 EQUALS coalesce_int(@c10, @c6)�
112+
����& ���(0��08@5SCAN(<,>) | FILTER @c6 EQUALS coalesce_int(@c10, @c6)�
85113
digraph G {
86114
fontname=courier;
87115
rankdir=BT;

yaml-tests/src/test/resources/literal-tests.metrics.yaml

Lines changed: 42 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,73 +2,94 @@ unnamed-3:
22
- query: EXPLAIN select * from B where 6L = coalesce(5L, 6L)
33
explain: SCAN(<,>) | FILTER @c6 EQUALS coalesce_long(@c10, @c6)
44
task_count: 155
5-
task_total_time_ms: 74
5+
task_total_time_ms: 71
66
transform_count: 38
7-
transform_time_ms: 51
7+
transform_time_ms: 58
88
transform_yield_count: 14
9-
insert_time_ms: 5
9+
insert_time_ms: 1
10+
insert_new_count: 14
11+
insert_reused_count: 2
12+
- query: EXPLAIN select * from B where 6 = coalesce(5, 6)
13+
explain: SCAN(<,>) | FILTER @c6 EQUALS coalesce_int(@c10, @c6)
14+
task_count: 155
15+
task_total_time_ms: 14
16+
transform_count: 38
17+
transform_time_ms: 6
18+
transform_yield_count: 14
19+
insert_time_ms: 0
20+
insert_new_count: 14
21+
insert_reused_count: 2
22+
unnamed-4:
23+
- query: EXPLAIN select * from B where 6L = coalesce(5L, 6L)
24+
explain: SCAN(<,>) | FILTER @c6 EQUALS coalesce_long(@c10, @c6)
25+
task_count: 155
26+
task_total_time_ms: 71
27+
transform_count: 38
28+
transform_time_ms: 58
29+
transform_yield_count: 14
30+
insert_time_ms: 1
1031
insert_new_count: 14
1132
insert_reused_count: 2
1233
- query: EXPLAIN select * from B where 6L = coalesce(5I, 6I)
1334
explain: SCAN(<,>) | FILTER @c6 EQUALS promote(coalesce_int(@c10, @c12) AS LONG)
1435
task_count: 155
15-
task_total_time_ms: 75
36+
task_total_time_ms: 16
1637
transform_count: 38
17-
transform_time_ms: 52
38+
transform_time_ms: 7
1839
transform_yield_count: 14
19-
insert_time_ms: 3
40+
insert_time_ms: 1
2041
insert_new_count: 14
2142
insert_reused_count: 2
2243
- query: EXPLAIN select * from B where 6L = coalesce(5, 6)
2344
explain: SCAN(<,>) | FILTER @c6 EQUALS promote(coalesce_int(@c10, @c12) AS LONG)
2445
task_count: 155
25-
task_total_time_ms: 74
46+
task_total_time_ms: 16
2647
transform_count: 38
27-
transform_time_ms: 51
48+
transform_time_ms: 6
2849
transform_yield_count: 14
29-
insert_time_ms: 4
50+
insert_time_ms: 0
3051
insert_new_count: 14
3152
insert_reused_count: 2
3253
- query: EXPLAIN select * from B where 6 = coalesce(5L, 6)
3354
explain: SCAN(<,>) | FILTER promote(@c6 AS LONG) EQUALS coalesce_long(@c10, promote(@c6
3455
AS LONG))
3556
task_count: 155
36-
task_total_time_ms: 74
57+
task_total_time_ms: 17
3758
transform_count: 38
38-
transform_time_ms: 52
59+
transform_time_ms: 7
3960
transform_yield_count: 14
40-
insert_time_ms: 5
61+
insert_time_ms: 0
4162
insert_new_count: 14
4263
insert_reused_count: 2
4364
- query: EXPLAIN select * from B where 6I = coalesce(5L, 6I)
4465
explain: SCAN(<,>) | FILTER promote(@c6 AS LONG) EQUALS coalesce_long(@c10, promote(@c6
4566
AS LONG))
4667
task_count: 155
47-
task_total_time_ms: 74
68+
task_total_time_ms: 16
4869
transform_count: 38
49-
transform_time_ms: 54
70+
transform_time_ms: 7
5071
transform_yield_count: 14
51-
insert_time_ms: 4
72+
insert_time_ms: 0
5273
insert_new_count: 14
5374
insert_reused_count: 2
5475
- query: EXPLAIN select * from B where 6i = coalesce(5l, 6i)
5576
explain: SCAN(<,>) | FILTER promote(@c6 AS LONG) EQUALS coalesce_long(@c10, promote(@c6
5677
AS LONG))
5778
task_count: 155
58-
task_total_time_ms: 74
79+
task_total_time_ms: 17
5980
transform_count: 38
60-
transform_time_ms: 53
81+
transform_time_ms: 7
6182
transform_yield_count: 14
62-
insert_time_ms: 3
83+
insert_time_ms: 0
6384
insert_new_count: 14
6485
insert_reused_count: 2
6586
- query: EXPLAIN select * from B where 6 = coalesce(5, 6)
6687
explain: SCAN(<,>) | FILTER @c6 EQUALS coalesce_int(@c10, @c6)
6788
task_count: 155
68-
task_total_time_ms: 74
89+
task_total_time_ms: 14
6990
transform_count: 38
70-
transform_time_ms: 52
91+
transform_time_ms: 6
7192
transform_yield_count: 14
72-
insert_time_ms: 4
93+
insert_time_ms: 0
7394
insert_new_count: 14
7495
insert_reused_count: 2

0 commit comments

Comments
 (0)