Skip to content

[Bug](round function) Use shortest round-trip when serializing double to string#64577

Open
xy720 wants to merge 4 commits into
apache:masterfrom
xy720:fix-round
Open

[Bug](round function) Use shortest round-trip when serializing double to string#64577
xy720 wants to merge 4 commits into
apache:masterfrom
xy720:fix-round

Conversation

@xy720

@xy720 xy720 commented Jun 16, 2026

Copy link
Copy Markdown
Member

What problem does this PR solve?

Problem Summary:

select round(23900/293, 2) returned 81.56999999999999 instead of 81.57, and similar issue on select round(45800/486,2) etc.

The double-to-string formatters in BE (#54760) and FE both used fixed 16-digit %g, which exposes the residual representation error of doubles whose decimal form is not exactly representable in binary.

Float branch left unchanged (regression only affects double; int/int, bigint/bigint and double/double are all promoted to double in Nereids).

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@hello-stephen

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@xy720

xy720 commented Jun 16, 2026

Copy link
Copy Markdown
Member Author

run buildall

@xy720

xy720 commented Jun 16, 2026

Copy link
Copy Markdown
Member Author

/review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review result: request changes.

Findings are inline. The main blocker is that the FE formatter no longer stays aligned with the BE runtime formatter for FLOAT, and the DOUBLE shortest-round-trip change is still incomplete for FE scientific notation.

Critical checkpoint conclusions:

  • Goal/tests: the reported fixed-notation ROUND display case is covered, but the implementation does not fully accomplish FE/BE cast-to-string consistency.
  • Scope/focus: mostly focused, but the FE FLOAT path changes behavior despite the PR being scoped to DOUBLE.
  • Concurrency/lifecycle/config/storage/transactions/observability: not applicable to this formatter/test-only change.
  • Parallel paths/compatibility: BE and FE parallel formatting paths remain inconsistent for FLOAT and scientific DOUBLE values.
  • Test coverage/results: added regression coverage exercises the reported cases, but misses the inconsistent FLOAT/scientific DOUBLE paths, and the added suite drops its table after testing against the regression-test rules.
  • Performance: the BE row-by-row double serialization path should keep the compiled fmt pattern.
  • User focus: no additional user-provided review focus was supplied.

Comment thread be/src/exprs/function/cast/cast_to_string.h Outdated
Comment thread regression-test/suites/query_p0/sql_functions/math_functions/test_round.groovy Outdated
@xy720

xy720 commented Jun 16, 2026

Copy link
Copy Markdown
Member Author

/review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review result: no additional blocking issues found on the current head.

Current head appears to address the earlier inline concerns I saw in the existing review context: BE now uses FMT_COMPILE("{}"), the regression table is only dropped before use, FLOAT keeps the fixed 7-significant-digit path, and DOUBLE has a shortest-format scientific branch. I did not submit duplicate inline comments.

Critical checkpoint conclusions:

  • Goal/tests: the PR targets incorrect DOUBLE-to-string exposure of IEEE-754 residuals for ROUND output. The changed BE/FE formatting paths and added regression cases cover the reported fixed-notation ROUND cases, including table-backed BE output and one-row FE output.
  • Scope/focus: the change is small and focused on double serialization plus matching FE formatting and regression coverage.
  • Concurrency/lifecycle/config/storage/transactions/observability: not applicable; this is formatter and regression-test code only.
  • Parallel paths/compatibility: FE and BE double formatting paths now use the same fixed/scientific cutoff and shortest-round-trip value source for the cases checked; FLOAT behavior remains on the prior fixed-precision branch.
  • Special checks/error handling/memory: no new Status/exception, allocation, nullable, or defensive-control-flow concern found in the modified code.
  • Test coverage/results: the appended regression results are deterministic for the new queries and follow the table cleanup rule. I did not run the full regression suite in this review runner.
  • Performance: the BE row serialization path keeps a compiled fmt pattern.
  • User focus: no additional user-provided review focus was supplied.

@xy720

xy720 commented Jun 16, 2026

Copy link
Copy Markdown
Member Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-H: Total hot run time: 29040 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 2aa4eb4359c0c29cabc94726d11e4285a37f60f6, data reload: false

------ Round 1 ----------------------------------
============================================
q1	17621	3991	3959	3959
q2	1988	297	189	189
q3	10358	1428	818	818
q4	4700	474	340	340
q5	7550	837	565	565
q6	201	170	135	135
q7	752	858	621	621
q8	9990	1567	1561	1561
q9	6299	4497	4456	4456
q10	6799	1792	1527	1527
q11	431	277	245	245
q12	669	443	292	292
q13	18149	3490	2812	2812
q14	260	260	246	246
q15	q16	781	769	702	702
q17	1028	961	971	961
q18	7179	5789	5605	5605
q19	1405	1261	1071	1071
q20	488	413	259	259
q21	5586	2682	2369	2369
q22	431	364	307	307
Total cold run time: 102665 ms
Total hot run time: 29040 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4369	4222	4244	4222
q2	332	359	230	230
q3	4641	4939	4411	4411
q4	2051	2113	1378	1378
q5	4437	4292	4295	4292
q6	232	181	125	125
q7	1704	1952	1681	1681
q8	2493	2194	2092	2092
q9	7928	7869	7886	7869
q10	4852	4791	4332	4332
q11	585	402	362	362
q12	858	807	537	537
q13	3305	3636	2998	2998
q14	307	317	294	294
q15	q16	742	726	657	657
q17	1342	1380	1325	1325
q18	7712	7307	6861	6861
q19	1155	1104	1148	1104
q20	2226	2214	1953	1953
q21	5239	4547	4373	4373
q22	545	475	431	431
Total cold run time: 57055 ms
Total hot run time: 51527 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 175053 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 2aa4eb4359c0c29cabc94726d11e4285a37f60f6, data reload: false

query5	4353	634	474	474
query6	433	191	174	174
query7	4883	553	308	308
query8	361	209	209	209
query9	8758	4080	4066	4066
query10	444	308	256	256
query11	5962	2350	2183	2183
query12	152	102	100	100
query13	1285	620	425	425
query14	6384	5404	5071	5071
query14_1	4417	4395	4364	4364
query15	205	197	180	180
query16	1041	446	443	443
query17	1130	689	577	577
query18	2742	479	341	341
query19	205	185	147	147
query20	112	109	108	108
query21	216	138	118	118
query22	13798	13664	13374	13374
query23	17308	16434	16080	16080
query23_1	16218	16182	16329	16182
query24	7525	1766	1294	1294
query24_1	1270	1304	1268	1268
query25	530	432	357	357
query26	1290	307	160	160
query27	2665	565	330	330
query28	4397	2067	2047	2047
query29	1041	594	476	476
query30	316	236	202	202
query31	1103	1066	965	965
query32	103	61	60	60
query33	511	322	244	244
query34	1180	1157	661	661
query35	737	776	668	668
query36	1361	1391	1209	1209
query37	151	103	88	88
query38	3203	3250	3058	3058
query39	937	936	903	903
query39_1	874	876	865	865
query40	223	119	99	99
query41	64	62	62	62
query42	98	90	97	90
query43	316	332	284	284
query44	1427	787	780	780
query45	201	182	177	177
query46	1058	1209	748	748
query47	2406	2400	2186	2186
query48	416	416	280	280
query49	625	461	354	354
query50	1068	358	262	262
query51	4342	4287	4186	4186
query52	85	87	76	76
query53	248	268	194	194
query54	256	209	192	192
query55	78	75	68	68
query56	235	210	212	210
query57	1419	1394	1318	1318
query58	237	209	199	199
query59	1603	1606	1490	1490
query60	276	240	233	233
query61	154	147	143	143
query62	716	645	586	586
query63	227	184	193	184
query64	2488	750	628	628
query65	4847	4813	4789	4789
query66	1774	466	347	347
query67	29972	29811	29627	29627
query68	3324	1549	962	962
query69	431	311	265	265
query70	1084	1007	966	966
query71	301	236	215	215
query72	3053	2565	2244	2244
query73	823	845	442	442
query74	5092	5003	4761	4761
query75	2631	2576	2247	2247
query76	2330	1209	775	775
query77	363	373	283	283
query78	12457	12531	11884	11884
query79	1415	1170	741	741
query80	910	466	378	378
query81	502	278	241	241
query82	628	155	127	127
query83	334	268	245	245
query84	270	152	147	147
query85	896	494	419	419
query86	407	318	279	279
query87	3360	3301	3197	3197
query88	3665	2784	2799	2784
query89	420	366	336	336
query90	1888	187	174	174
query91	171	159	129	129
query92	59	63	62	62
query93	1525	1497	895	895
query94	618	352	287	287
query95	671	375	341	341
query96	1063	801	329	329
query97	2702	2688	2536	2536
query98	214	206	208	206
query99	1160	1164	1027	1027
Total cold run time: 261664 ms
Total hot run time: 175053 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-H: Total hot run time: 29310 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 6e734a568f57ab78423e9e8a5a5d29775dd1deed, data reload: false

------ Round 1 ----------------------------------
============================================
q1	17615	4019	3995	3995
q2	1995	324	184	184
q3	10364	1418	809	809
q4	4684	469	337	337
q5	7508	842	574	574
q6	182	178	138	138
q7	750	848	631	631
q8	9551	1642	1676	1642
q9	6331	4476	4480	4476
q10	6796	1785	1529	1529
q11	439	278	240	240
q12	622	417	289	289
q13	18147	3329	2739	2739
q14	269	253	243	243
q15	q16	781	781	707	707
q17	1038	1014	1005	1005
q18	6893	5790	5581	5581
q19	1183	1257	1129	1129
q20	500	398	263	263
q21	5579	2770	2509	2509
q22	424	349	290	290
Total cold run time: 101651 ms
Total hot run time: 29310 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4340	4242	4267	4242
q2	327	356	220	220
q3	4557	4937	4393	4393
q4	2064	2171	1362	1362
q5	4432	4315	4320	4315
q6	231	174	125	125
q7	1745	1611	1998	1611
q8	2500	2162	2123	2123
q9	8046	7904	7824	7824
q10	4792	4724	4304	4304
q11	580	427	385	385
q12	730	762	531	531
q13	3465	3554	3055	3055
q14	310	314	277	277
q15	q16	703	734	691	691
q17	1361	1338	1309	1309
q18	8057	7425	6863	6863
q19	1135	1107	1117	1107
q20	2227	2221	1960	1960
q21	5242	4546	4760	4546
q22	515	450	400	400
Total cold run time: 57359 ms
Total hot run time: 51643 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 175619 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 6e734a568f57ab78423e9e8a5a5d29775dd1deed, data reload: false

query5	4302	645	491	491
query6	436	190	169	169
query7	4844	544	311	311
query8	362	206	191	191
query9	8739	4033	3995	3995
query10	431	314	256	256
query11	5919	2343	2113	2113
query12	152	102	98	98
query13	1277	578	420	420
query14	6390	5432	5048	5048
query14_1	4429	4415	4425	4415
query15	199	193	177	177
query16	974	436	439	436
query17	1062	687	554	554
query18	2412	457	338	338
query19	188	178	136	136
query20	111	101	106	101
query21	207	133	115	115
query22	13595	13522	13419	13419
query23	17263	16506	16213	16213
query23_1	16268	16280	16239	16239
query24	7511	1789	1284	1284
query24_1	1349	1313	1295	1295
query25	524	427	381	381
query26	1302	321	165	165
query27	2673	524	324	324
query28	4455	2045	2041	2041
query29	1079	628	485	485
query30	310	239	201	201
query31	1108	1078	961	961
query32	108	61	56	56
query33	513	330	269	269
query34	1203	1170	707	707
query35	761	803	697	697
query36	1410	1384	1227	1227
query37	155	107	94	94
query38	3255	3181	3045	3045
query39	926	910	906	906
query39_1	872	900	863	863
query40	225	130	105	105
query41	70	68	67	67
query42	98	98	96	96
query43	322	329	280	280
query44	1423	788	804	788
query45	198	190	181	181
query46	1094	1253	746	746
query47	2349	2347	2204	2204
query48	409	438	298	298
query49	665	484	364	364
query50	1069	357	260	260
query51	4356	4306	4218	4218
query52	91	91	81	81
query53	255	270	196	196
query54	285	234	223	223
query55	80	78	73	73
query56	244	244	224	224
query57	1414	1415	1320	1320
query58	245	228	221	221
query59	1562	1650	1453	1453
query60	298	257	240	240
query61	178	167	172	167
query62	706	661	594	594
query63	240	198	199	198
query64	2581	840	626	626
query65	4858	4761	4796	4761
query66	1788	468	339	339
query67	29695	29715	29557	29557
query68	3236	1587	947	947
query69	402	309	278	278
query70	1100	971	939	939
query71	297	234	216	216
query72	2888	2636	2269	2269
query73	828	804	432	432
query74	5104	4951	4774	4774
query75	2626	2600	2222	2222
query76	2367	1208	783	783
query77	343	388	283	283
query78	12403	12564	11773	11773
query79	1442	1153	799	799
query80	1268	514	385	385
query81	520	276	246	246
query82	611	156	120	120
query83	316	275	250	250
query84	278	147	117	117
query85	908	517	422	422
query86	437	299	279	279
query87	3387	3320	3194	3194
query88	3763	2796	2794	2794
query89	430	367	333	333
query90	1881	188	182	182
query91	170	181	132	132
query92	63	56	59	56
query93	1578	1393	942	942
query94	715	332	316	316
query95	692	470	343	343
query96	1139	799	361	361
query97	2698	2688	2562	2562
query98	208	215	202	202
query99	1159	1155	1029	1029
Total cold run time: 261549 ms
Total hot run time: 175619 ms

@xy720

xy720 commented Jun 16, 2026

Copy link
Copy Markdown
Member Author

/review

@xy720

xy720 commented Jun 16, 2026

Copy link
Copy Markdown
Member Author

run buildall

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found one current-head correctness issue. The common round/cast cases are improved and the previous inline concerns about float formatting, the old FE scientific branch, BE compiled format, and the trailing regression-test drop are not duplicated here.

Critical checkpoint conclusions:

  • Goal and proof: the PR aims to avoid exposing residual double tails when casting rounded doubles to strings. The added regression coverage proves the reported round cases, but edge finite double values still have an FE/BE cast-to-string mismatch.
  • Scope: the implementation is small and focused on double string formatting plus tests.
  • Concurrency, locks, lifecycle, config, persistence, observability: not materially involved in this change.
  • Parallel paths: both BE runtime cast output and FE literal/constant-folding output are modified; the new FE path does not fully match BE for extreme finite doubles.
  • Tests/results: regression output is updated for the reported cases, but it does not cover FE folding for Double.MIN_VALUE/Double.MAX_VALUE. The current BE UT macOS failure I inspected is due to the runner using JDK 25 where JDK 17 is required, so I am not treating that CI failure as a PR code defect.
  • User focus: no additional user-provided review focus was supplied.

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-H: Total hot run time: 29449 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit a19646428d75af5c83a28e7f85af617ae6f3b783, data reload: false

------ Round 1 ----------------------------------
============================================
q1	17615	4274	4258	4258
q2	2103	318	185	185
q3	10196	1427	808	808
q4	4698	505	345	345
q5	7499	863	590	590
q6	180	181	141	141
q7	774	824	622	622
q8	9800	1715	1594	1594
q9	6368	4494	4439	4439
q10	6838	1814	1526	1526
q11	432	275	245	245
q12	660	429	300	300
q13	18142	3889	2741	2741
q14	280	270	243	243
q15	q16	797	784	721	721
q17	1094	1081	969	969
q18	7175	5908	5623	5623
q19	1198	1297	1125	1125
q20	497	414	266	266
q21	5604	2610	2397	2397
q22	428	369	311	311
Total cold run time: 102378 ms
Total hot run time: 29449 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4575	4462	4478	4462
q2	343	378	232	232
q3	4737	5048	4483	4483
q4	2279	2243	1570	1570
q5	4565	4401	4443	4401
q6	271	309	156	156
q7	2117	1982	1696	1696
q8	2687	2308	2329	2308
q9	8096	8189	8096	8096
q10	4959	4843	4640	4640
q11	614	461	439	439
q12	790	762	566	566
q13	3355	3803	3021	3021
q14	315	316	273	273
q15	q16	770	765	685	685
q17	1404	1379	1401	1379
q18	8362	7792	6941	6941
q19	1114	1097	1076	1076
q20	2296	2252	2001	2001
q21	5450	4838	4658	4658
q22	557	484	438	438
Total cold run time: 59656 ms
Total hot run time: 53521 ms

@xy720

xy720 commented Jun 16, 2026

Copy link
Copy Markdown
Member Author

/review

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 175411 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit a19646428d75af5c83a28e7f85af617ae6f3b783, data reload: false

query5	4312	616	476	476
query6	446	188	174	174
query7	4807	555	308	308
query8	359	213	200	200
query9	8802	4012	4004	4004
query10	436	311	251	251
query11	5921	2327	2144	2144
query12	153	100	96	96
query13	1284	633	428	428
query14	6371	5371	4998	4998
query14_1	4346	4428	4329	4329
query15	199	190	175	175
query16	988	442	418	418
query17	1085	666	559	559
query18	2431	462	331	331
query19	204	177	138	138
query20	108	109	108	108
query21	216	137	114	114
query22	13503	13617	13488	13488
query23	17087	16420	16117	16117
query23_1	16305	16158	16259	16158
query24	7492	1762	1345	1345
query24_1	1327	1324	1322	1322
query25	574	469	403	403
query26	1333	313	165	165
query27	2680	566	341	341
query28	4503	2083	2062	2062
query29	1079	620	497	497
query30	308	240	194	194
query31	1103	1090	967	967
query32	107	60	62	60
query33	524	320	269	269
query34	1171	1123	666	666
query35	756	784	691	691
query36	1384	1405	1237	1237
query37	152	104	93	93
query38	3190	3067	3030	3030
query39	921	926	911	911
query39_1	880	881	882	881
query40	220	125	109	109
query41	74	67	65	65
query42	98	99	96	96
query43	322	329	285	285
query44	1459	781	781	781
query45	196	183	181	181
query46	1112	1261	744	744
query47	2392	2401	2321	2321
query48	431	420	300	300
query49	644	497	372	372
query50	1013	364	267	267
query51	4367	4263	4295	4263
query52	88	89	78	78
query53	247	266	191	191
query54	279	230	210	210
query55	84	75	72	72
query56	248	234	223	223
query57	1426	1433	1319	1319
query58	261	220	219	219
query59	1531	1611	1374	1374
query60	294	258	231	231
query61	178	189	143	143
query62	717	660	592	592
query63	226	190	196	190
query64	2549	729	583	583
query65	4831	4819	4743	4743
query66	1788	464	331	331
query67	29782	29543	29554	29543
query68	3273	1540	842	842
query69	407	300	267	267
query70	1050	883	953	883
query71	304	236	214	214
query72	2830	2603	2325	2325
query73	870	796	408	408
query74	5078	4936	4783	4783
query75	2608	2628	2221	2221
query76	2343	1240	798	798
query77	354	384	275	275
query78	12354	12346	11778	11778
query79	1430	1182	746	746
query80	1286	468	376	376
query81	528	280	238	238
query82	662	159	120	120
query83	323	274	245	245
query84	272	147	111	111
query85	918	516	403	403
query86	441	295	276	276
query87	3346	3323	3180	3180
query88	3691	2787	2762	2762
query89	415	380	335	335
query90	1951	176	207	176
query91	167	158	130	130
query92	60	62	56	56
query93	1577	1484	919	919
query94	774	344	310	310
query95	701	377	338	338
query96	1060	785	353	353
query97	2734	2655	2591	2591
query98	225	199	195	195
query99	1169	1171	1024	1024
Total cold run time: 261303 ms
Total hot run time: 175411 ms

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review result: request changes.

New finding:

  • BE unit expectations for CastToString double output were not updated; inline comment left.

Checkpoint conclusions:

  • Goal/test: The goal is to avoid exposing double residual tails in cast-to-string/round display. The main round regression coverage is useful, but BE unit coverage for the changed formatter is stale, and existing review threads already cover remaining FE/BE edge-format consistency concerns.
  • Scope: The change is focused on double string formatting and round regression coverage.
  • Concurrency/lifecycle/config/compatibility: No new concurrency, lifecycle-managed state, configuration, storage format, or FE-BE protocol changes found.
  • Parallel paths: BE runtime cast, FE legacy literal rendering, and Nereids literal rendering are all touched. Existing review threads still need the edge-value consistency concern resolved across these paths and affected expected outputs.
  • Special conditions: Float-compatible FE rendering keeps the previous fixed-precision path; the double path is the changed behavior.
  • Tests/results: New regression SQL is ordered where needed and no longer drops the table after the test, but the changed BE unit expectations are missing. I did not run the Doris test suites in this review environment.
  • Observability/transactions/writes: Not applicable.
  • Performance: The BE hot-path format uses FMT_COMPILE in current head; no additional hot-path concern found.
  • User focus: .code-review.6GbyXi/review_focus.txt had no additional focus points.

std::numeric_limits<double>::digits10 + 1);
// shortest round-trip, fixed-precision %g would expose IEEE-754
// residual error e.g. round(23900/293, 2) -> "81.56999999999999".
end = fmt::format_to(buffer, FMT_COMPILE("{}"), value);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changes CastToString::from_number<double> output, but the BE unit test expectations for this same path were not updated. be/test/exprs/function/cast/cast_to_string.cpp still expects 12345678901234567.12345 -> 1.234567890123457e+16, 123456789012345678.12345 -> 1.234567890123457e+17, and denorm_min -> 4.940656458412465e-324, while this PR's generated regression output changed those spellings to 1.2345678901234568e+16, 1.2345678901234568e+17, and 5e-324. The BE UT will fail once run. Please update the BE unit expectations, and any other intentional edge-value expected data, together with this formatter change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants