Merged PRs
dolt
- 5828: go/store/nbs: reduce startup latency for chunk journal
#5393 added a "journal index" to accelerate chunk journal bootstrapping. Unfortunately it never worked! Bugs in the journal index bootstrapping process caused sanity checks to fail and the journal index was subsequently dropped. The chunk journal itself was still valid and the bugs had no effect on correctness. However, without a valid journal index we were forced to always take the slow-path on startup.
go-mysql-server
- 1739: Populating the
Decimal
property in Field response metadata
Fixes #5834
In addition to the unit tests here, I'm also working on a Dolt PR to update the mysql connector library integration tests to test the Rubymysql2
library. - 1737: Coalesce.Type() needs to handle type types.Null
Coalesce.Type() only checks if its arguments to have typenil
. But NULL constants have typetypes.Null
, and we need to check for that too. - 1735: only hash
expression.UnresolvedColumn
for OnDuplicateExpressions
Special logic is used to qualify columns forInsertInto.OnDuplicateExprs
. Since qualify usestransform.OneNodeExprWithNode
it will try to qualify all expressions (Literals
,Tuples
, etc). This change makes it so that we only try to qualify Columns.
fix for: #5799 - 1728: hashjoin indexing
When we have plan of the following format:
The indexes we assign to GetFields during analysis don't align with the indexes of the actual columns in each row during execution time. This is a result of StripNode, PrependNode, and the nested Joins with SubqueryAlias.InSubquery ... CrossJoin Left: Table Right: SubqueryAlias OuterScopeVisibility: true ... HashJoin HashLookup source: ... target: TableAlias ...
This error wasn't caught sooner as the incorrect indexes are too low, so they never threwIndexOutOfBounds
errors and just returned potentially incorrect results instead.
The fix was to correct these indexes at analysis time.
Firstly,SubqueryAlias
nodes withOuterScopeVisibilty = true
inside joins need to see the left sibling node (in addition to the parent nodes). SoScope
was modified to include some new fields, specifically for sibling nodes. Additionally, the filefinalizeSubquery
was changed to track the parent as well, so we could detect when we're analyzing aSubqueryAlias
on the right side of a join, and add the left child to the scope.
Additionally, pushdownFilters was modified to not undo all the changes to the Analyzer for HashLookups.
At runtime, thePrependRow
nodes cache the rows outside theInSubquery
, while the buildJoinIter forCrossJoin
would include both the outside and the left row. This meant that some parts of the inner HashJoin would receive extra columns while others didn't. The fix here was to alter thescope.InJoin
depending on which parts of HashJoin we were building.
Lastly, to have these changes not break for PreparedStatements, we just needed to not redofinalizeUnions
inpostPrepared
, as we don't replan joins inpostPrepared
, so we don't know if we're in a join or not, and the correct indexes are set inprePrepared
.
Along the way, we discovered a query that panics, but the cause is different than the purpose of this fix, and it panicked the same way before these changes, so it is left as a skipped test.
Fix for: #5714 - 1726: subquery indexing tests
Closed Issues
- 5826: Coalesce returning wrong value
- 5799: Constraints with tuples cause panic
- 3967: Add an equivalent to .gitignore.
Latency
Read Tests | MySQL | Dolt | Multiple |
---|---|---|---|
covering_index_scan | 1.93 | 2.76 | 1.4 |
groupby_scan | 12.3 | 16.71 | 1.4 |
index_join | 1.16 | 4.1 | 3.5 |
index_join_scan | 1.14 | 2.11 | 1.9 |
index_scan | 30.81 | 54.83 | 1.8 |
oltp_point_select | 0.14 | 0.49 | 3.5 |
oltp_read_only | 2.81 | 8.43 | 3.0 |
select_random_points | 0.29 | 0.75 | 2.6 |
select_random_ranges | 0.35 | 1.12 | 3.2 |
table_scan | 30.81 | 54.83 | 1.8 |
types_table_scan | 71.83 | 173.58 | 2.4 |
reads_mean_multiplier | 2.4 |
Write Tests | MySQL | Dolt | Multiple |
---|---|---|---|
bulk_insert | 0.001 | 0.001 | 1.0 |
oltp_delete_insert | 5.77 | 6.21 | 1.1 |
oltp_insert | 2.71 | 2.97 | 1.1 |
oltp_read_write | 6.91 | 15.83 | 2.3 |
oltp_update_index | 3.02 | 3.13 | 1.0 |
oltp_update_non_index | 3.25 | 3.13 | 1.0 |
oltp_write_only | 4.03 | 7.56 | 1.9 |
types_delete_insert | 5.47 | 6.91 | 1.3 |
writes_mean_multiplier | 1.3 |
Overall Mean Multiple | 2.0 |
---|