Commit 2d3495d
authored
do revert 22711 (#22740)
### **User description**
## What type of PR is this?
- [ ] API-change
- [x] BUG
- [ ] Improvement
- [ ] Documentation
- [ ] Feature
- [ ] Test and CI
- [ ] Code Refactoring
## Which issue(s) this PR fixes:
issue #22523
## What this PR does / why we need it:
revert due to TPCH q19 performance degradation
___
### **PR Type**
Bug fix
___
### **Description**
- Revert decimal64/decimal128 conversion fixes causing TPCH q19
performance degradation
- Remove proper scale handling in stats.go decimal conversions
- Remove decimal type cases from shuffle range type checks
- Remove comprehensive decimal conversion test coverage
___
### Diagram Walkthrough
```mermaid
flowchart LR
A["Decimal Conversion Fixes"] -->|Revert| B["Direct float64 Cast"]
C["Scale-aware Conversion"] -->|Remove| D["Hardcoded Scale 0"]
E["Decimal Type Handling"] -->|Remove| F["Shuffle Range Logic"]
G["Test Coverage"] -->|Delete| H["Decimal Test Cases"]
```
<details> <summary><h3> File Walkthrough</h3></summary>
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Bug
fix</strong></td><td><table>
<tr>
<td>
<details>
<summary><strong>stats.go</strong><dd><code>Revert decimal conversion to
direct float64 cast</code>
</dd></summary>
<hr>
pkg/sql/plan/stats.go
<ul><li>Reverted decimal64 conversion from scale-aware
<code>Decimal64ToFloat64</code> to <br>direct <code>float64</code>
cast<br> <li> Reverted decimal128 conversion from scale-aware
<code>Decimal128ToFloat64</code> to <br>hardcoded scale 0<br> <li>
Removed intermediate variable assignments for decimal decoding<br> <li>
Restored simpler but less accurate decimal-to-float conversion
logic</ul>
</details>
</td>
<td><a
href="https://github.com/matrixorigin/matrixone/pull/22740/files#diff-3b3d55fa9884dcf8980f90043a05b26a04d0153ae89fcf032cec998752c0cafa">+6/-13</a>
</td>
</tr>
<tr>
<td>
<details>
<summary><strong>stats.go</strong><dd><code>Remove decimal type handling
from stats conversion</code>
</dd></summary>
<hr>
pkg/vm/engine/disttae/stats.go
<ul><li>Removed decimal64 and decimal128 cases from
<code>getMinMaxValueByFloat64</code> <br>function<br> <li> Removed
scale-aware conversion using <code>Decimal64ToFloat64</code> and
<br><code>Decimal128ToFloat64</code><br> <li> Removed decimal types from
shuffle range type switch cases in two <br>locations<br> <li> Simplified
type handling by excluding decimal types from numeric range
<br>processing</ul>
</details>
</td>
<td><a
href="https://github.com/matrixorigin/matrixone/pull/22740/files#diff-d0f8ce84135a062e5992dcb3d1175993ee396beae48de126969255cd9240d02b">+2/-10</a>
</td>
</tr>
</table></td></tr><tr><td><strong>Tests</strong></td><td><table>
<tr>
<td>
<details>
<summary><strong>stats_test.go</strong><dd><code>Remove decimal
conversion test coverage</code>
</dd></summary>
<hr>
pkg/sql/plan/stats_test.go
<ul><li>Removed all three decimal conversion test functions<br> <li>
Deleted <code>TestUpdateStatsInfo_Decimal64_NegativeValues</code>
test<br> <li> Deleted
<code>TestUpdateStatsInfo_Decimal128_NegativeValues</code> test<br> <li>
Deleted <code>TestUpdateStatsInfo_Decimal_DifferentScales</code>
test<br> <li> Removed test imports for types, pb, and
testify/require</ul>
</details>
</td>
<td><a
href="https://github.com/matrixorigin/matrixone/pull/22740/files#diff-99727172c3e9bb9536487e724b5b68d8d02bfbf514d145e062222952cdde78da">+0/-246</a>
</td>
</tr>
<tr>
<td>
<details>
<summary><strong>stats_test.go</strong><dd><code>Remove decimal
conversion test function</code>
</dd></summary>
<hr>
pkg/vm/engine/disttae/stats_test.go
<ul><li>Removed entire <code>TestGetMinMaxValueByFloat64_Decimal</code>
test function<br> <li> Deleted comprehensive test coverage for decimal64
and decimal128 <br>conversions<br> <li> Removed tests for
positive/negative values, different scales, and <br>min/max
relationships<br> <li> Removed test cases validating correct handling of
two's complement <br>representation</ul>
</details>
</td>
<td><a
href="https://github.com/matrixorigin/matrixone/pull/22740/files#diff-5a180d6cc7bed3d03a8f45d2ceb0a95a41bcb192162481f0dd52d4db5f119896">+0/-120</a>
</td>
</tr>
</table></td></tr></tr></tbody></table>
</details>
___1 parent 22e88af commit 2d3495d
File tree
4 files changed
+8
-389
lines changed- pkg
- sql/plan
- vm/engine/disttae
4 files changed
+8
-389
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
| 353 | + | |
| 354 | + | |
360 | 355 | | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
367 | 360 | | |
368 | 361 | | |
369 | 362 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | 21 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | 22 | | |
27 | 23 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | 24 | | |
271 | 25 | | |
272 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
609 | 609 | | |
610 | 610 | | |
611 | 611 | | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | | - | |
616 | | - | |
617 | | - | |
618 | | - | |
619 | | - | |
620 | 612 | | |
621 | 613 | | |
622 | 614 | | |
| |||
671 | 663 | | |
672 | 664 | | |
673 | 665 | | |
674 | | - | |
| 666 | + | |
675 | 667 | | |
676 | 668 | | |
677 | 669 | | |
| |||
717 | 709 | | |
718 | 710 | | |
719 | 711 | | |
720 | | - | |
| 712 | + | |
721 | 713 | | |
722 | 714 | | |
723 | 715 | | |
| |||
0 commit comments