github dolthub/dolt v1.59.7
1.59.7

22 hours ago

Merged PRs

dolt

  • 9823: #9817 - Add bats for binary ops
    Fixes #9817
    Companion dolthub/go-mysql-server#3208, #9824
  • 9822: fix missed context canceled error for dolt_test_run()
    Changes:
    • delete Close() calls missed in #9811
    • adds a test for single result assertion
    • add missing cases for int types
  • 9819: Allow foreign keys to reference dolt_branches system table
    Allows creating foreign keys on user tables that reference the name column on the dolt_branches table.
    Fixes: #9712

go-mysql-server

  • 3210: Copy parent row in lateralJoinIterator.buildRow
    fixes #9820
    Also rename left and right to primary and secondary to follow the same pattern as other join iterators
  • 3209: Convert values to strings when evaluating bit_length
    Fixes #9818
  • 3208: #9817 - Fix binary operations return type to be uint64
    Fixes #9817
  • 3205: Relax restriction that was preventing us from caching the result of subqueries.
    dolthub/go-mysql-server#1470 was supposed to, among other things, add restrictions to when we generate CachedResults nodes to cache subquery results. However, the added check is overly broad, and as a result it became impossible to actually cache subquery results. Currently, there is not a single plan test that contains a CachedResults node in the output plan.
    The cacheSubqueryAliasesInJoins function has a comment:
    //The left-most child of a join root is an exception that cannot be cached.
    No rationale is given for this. Looking at it, it seems like we used to generate CachedResults nodes before we finished resolving references in the query, and now we wait until after. So it's possible that this is the reason for the restriction, and the entire check is no longer necessary.
    Either way, the implementation is more restrictive than the comment would suggest. Due to how the algorithm tracks state via function parameters, it doesn't propagate state from a child node to it's parents/siblings, and the flag for recording that it's encountered a subqeury gets unset. As a result, no Subqueries will actually be cached.
    This PR fixes the tree walk to correctly remember once it's encountered a subquery and allow subsequent subqueries to be cached. This is still more broad than the comment would suggest, since it doesn't require that this subquery appear in the left-most child of the join.
    Among the changed plan tests, we see that CachedResults nodes are now emitted. Most of them are the children of HashLookups, but there are some that are the children of InnerJoin and SemiJoin nodes where one of the things being joined is a subquery.

Closed Issues

  • 9712: Extending Dolt system tables, specifically dolt_branch, via foreign key
  • 9820: LATERAL keyword causes JOIN to incorrectly return empty result
  • 9818: BIT_LENGTH() returns incorrect results for int
  • 9817: Bitwise operations with negative numbers always return 9223372036854775807

Performance

Read Tests MySQL Dolt Multiple
covering_index_scan 1.82 0.65 0.36
groupby_scan 13.7 18.61 1.36
index_join 1.5 2.43 1.62
index_join_scan 1.5 1.39 0.93
index_scan 34.33 30.26 0.88
oltp_point_select 0.21 0.28 1.33
oltp_read_only 3.89 5.28 1.36
select_random_points 0.36 0.57 1.58
select_random_ranges 0.39 0.61 1.56
table_scan 34.95 32.53 0.93
types_table_scan 75.82 125.52 1.66
reads_mean_multiplier 1.23
Write Tests MySQL Dolt Multiple
oltp_delete_insert 8.43 6.55 0.78
oltp_insert 4.18 3.25 0.78
oltp_read_write 9.22 11.65 1.26
oltp_update_index 4.25 3.3 0.78
oltp_update_non_index 4.25 3.25 0.76
oltp_write_only 5.28 6.43 1.22
types_delete_insert 8.58 6.91 0.81
writes_mean_multiplier 0.91
TPC-C TPS Tests MySQL Dolt Multiple
tpcc-scale-factor-1 93.4 39.75 2.35
tpcc_tps_multiplier 2.35
Overall Mean Multiple 1.50

Don't miss a new dolt release

NewReleases is sending notifications on new releases.