Skip to content

fix sqllogictest harness to use float rounding#7426

Merged
jycor merged 8 commits intomainfrom
james/round
Jan 30, 2024
Merged

fix sqllogictest harness to use float rounding#7426
jycor merged 8 commits intomainfrom
james/round

Conversation

@jycor
Copy link
Contributor

@jycor jycor commented Jan 29, 2024

When we generated the results for MySQL (specifically the float results), we used the golang fmt.Sprintf('%.3f') string, even for decimal types. Meanwhile, the doltharness was using decimal.Round(). There's evidently a difference in the way these two rounding operations work, so we had some failures due to rounding errors.

This PR makes it so decimals are rounded the same way floats are, so that results are consistent.

@coffeegoddd
Copy link
Contributor

@jycor DOLT

comparing_percentages
99.998653 to 99.998602
version result total
4e38973 not ok 83
4e38973 ok 5937374
version total_tests
4e38973 5937457
correctness_percentage
99.998602

@jycor jycor changed the title fix sqllogictest harness to truncate instead of round fix sqllogictest harness to round down on x.xxx5 Jan 29, 2024
@coffeegoddd
Copy link
Contributor

@jycor DOLT

comparing_percentages
99.998653 to 99.998602
version result total
a1ee787 not ok 83
a1ee787 ok 5937374
version total_tests
a1ee787 5937457
correctness_percentage
99.998602

@coffeegoddd
Copy link
Contributor

@jycor DOLT

comparing_percentages
99.998653 to 99.998771
version result total
0e933ab not ok 73
0e933ab ok 5937384
version total_tests
0e933ab 5937457
correctness_percentage
99.998771

@jycor jycor changed the title fix sqllogictest harness to round down on x.xxx5 fix sqllogictest harness to use float rounding Jan 30, 2024
Copy link
Contributor

@max-hoffman max-hoffman left a comment

Choose a reason for hiding this comment

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

lgtm but a test for a query that fails without this would be nice

@coffeegoddd
Copy link
Contributor

@jycor DOLT

comparing_percentages
99.998669 to 99.998787
version result total
4847a98 not ok 72
4847a98 ok 5937385
version total_tests
4847a98 5937457
correctness_percentage
99.998787

@jycor jycor merged commit a62f902 into main Jan 30, 2024
@jycor jycor deleted the james/round branch January 30, 2024 21:33
@github-actions
Copy link

@coffeegoddd DOLT

test_name detail row_cnt sorted mysql_time sql_mult cli_mult
batching LOAD DATA 10000 1 0.05 0.8
batching batch sql 10000 1 0.07 1.43
batching by line sql 10000 1 0.07 1.43
blob 1 blob 200000 1 0.89 3.09 3.51
blob 2 blobs 200000 1 0.9 3.9 4.46
blob no blob 200000 1 0.88 1.32 1.42
col type datetime 200000 1 0.81 1.75 1.93
col type varchar 200000 1 0.68 1.81 1.88
config width 2 cols 200000 1 0.78 1.27 1.28
config width 32 cols 200000 1 1.85 1.38 2.58
config width 8 cols 200000 1 0.98 1.91 1.58
pk type float 200000 1 0.87 1.22 1.23
pk type int 200000 1 0.99 0.98 1.04
pk type varchar 200000 1 1.5 1.12 0.95
row count 1.6mm 1600000 1 5.63 1.49 1.56
row count 400k 400000 1 1.38 1.46 1.51
row count 800k 800000 1 2.78 1.49 1.52
secondary index four index 200000 1 3.48 1.11 0.95
secondary index no secondary 200000 1 0.87 1.29 1.43
secondary index one index 200000 1 1.11 1.5 1.48
secondary index two index 200000 1 1.91 1.27 1.15
sorting shuffled 1mm 1000000 0 4.81 1.9 1.89
sorting sorted 1mm 1000000 1 4.79 1.91 1.9

@github-actions
Copy link

@coffeegoddd DOLT

name detail mean_mult
dolt_blame_basic system table 1.06
dolt_blame_commit_filter system table 2.71
dolt_commit_ancestors_commit_filter system table 0.84
dolt_commits_commit_filter system table 1
dolt_diff_log_join_from_commit system table 1.64
dolt_diff_log_join_to_commit system table 1.65
dolt_diff_table_from_commit_filter system table 1.08
dolt_diff_table_to_commit_filter system table 1.1
dolt_diffs_commit_filter system table 0.97
dolt_history_commit_filter system table 1.37
dolt_log_commit_filter system table 0.94

@github-actions
Copy link

@coffeegoddd DOLT

name add_cnt delete_cnt update_cnt latency
adds_only 60000 0 0 0.73
adds_updates_deletes 60000 60000 60000 3.72
deletes_only 0 60000 0 1.89
updates_only 0 0 60000 2.38

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants