Merged PRs
dolt
- 6847: has_ancestor() function
Motivated by this query:"Get the latest tag for a commit", which we solve by reading the tags table backwards, and returning the first that is an ancestor of our target commit.select from_x, to_x, to_commit, tag_name as version from dolt_diff_xy, LATERAL ( select tag_name from dolt_tags where has_ancestor(to_commit, tag_hash) order by date desc limit 1 ) tag
- 6845: add --silent option for push, pull, fetch
Adds a--silent
option forpush
,pull
,fetch
to suppress output of progress information.
Resolves: #6828 - 6834: migrate dolt ls to use sql queries
This change updatesdolt ls
to use the appropriate sql engine to generate results. This change also creates a system variable that, when enabled, shows dolt system tables inshow tables
andinformation_schema.tables
.
Related: #3922
Resolves: #2073 - 6833: JSON and stats interface refactor
Bring Dolt into line with the new stats and json interfaces.
go-mysql-server
- 2091: Non-ambiguous ORDER BY col should not error
- 2088: fix off by one for
found_rows
whenlimit > count(*)
We had a bug where we could increment the limit counter before receiving the EOF error.
fixes #6829
companion pr: dolthub/vitess#283 - 2085: small fixes for new test harness using server engine
This PR adds small fixes to server_engine that is used to test existing engine tests over running server. - 2081: Refactor JSON interfaces, stats interfaces
This tries to organize some of the stats and json code.
Stats has interfaces in thesql
package to avoid circular dependencies (catalog depends on stats, stats depends on sql.Row, etc). Sostats
package can depend onsql
for row and types, and most of GMS can use the generic sql interfaces without having to take a dependency on thestats
package.
memory
andenginetests
are the two main places where we depend on thestats
concrete implementations. Rather than putting the statistic objects inmemory
, I chose to put them into a separate package. The two main reasons are 1) the Dolt side has a conversion to the memory implementation as a presentation layer, and it made more sense in my head for the "presentation layer" to be in thestats
package rather thanmemory
; 2) I'm going to add logic that operates on histograms, and it seemed convenient to have that in its own package with a concrete implementation there for testing. If this is wrong I can always reverse course.
Most of the json changes are to try to make custom json types (statistic, histogram) more closely aligned with the default JSONDocument implementation, remove unused interfaces, deduplicate methods that all have a generic implementation. Other than typing additions in helper functions, the biggest change is probably adding theToInterface{}
method, which converts a genericJSONWrapper
interface (newly changed fromJSONValue
to avoid overloading the term) into a map of strings->interface{}. I mostly did this because I was having to go fromStatistic->[]byte->map[string]interface{}
to use our json serialization primitives.ToInterface{}
might be less performant than inlining search, extract, etc on structs (for example, we don't need to convertStatistic
an interface to extract therow_count
value), but the generic intermediate makes it pretty easy to plug new json types. Again this may be misguided, happy to reverse course if I'm overcomplicating something. - 2080: drop sort when secondary index is available
vitess
- 284: Include the With clause in walked subtrees for Select statements
We weren't walking theWith
clause for select statements, which caused us to not find any bind vars in use there.
Related to: #6852 - 283: allow query options to appear in any order any number of times
Allow statements like this to parse:Fixes #6829select distinct sql_calc_found_rows distinct * from t;
Companion PR: dolthub/go-mysql-server#2088
Closed Issues
- 6817: [no conn] no binlog connection to source, attempting to establish one {}
- 1256: dolt diff empty output with table filter on newly created tables
- 6828:
$ dolt push
generates lots ofUploading...
text in cron - 2073: Need a way to list all dolt system tables in SQL context
- 6829: SQL_CALC_FOUND_ROWS doesn't work?