ctx to WithFilters (#1832)

This commit is contained in:
Brian Hendriks
2021-06-15 15:24:44 -07:00
committed by GitHub
parent 151ca17cb2
commit 029bb5d83b
5 changed files with 9 additions and 6 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ require (
github.com/denisbrodbeck/machineid v1.0.1
github.com/dolthub/dolt/go/gen/proto/dolt/services/eventsapi v0.0.0-20201005193433-3ee972b1d078
github.com/dolthub/fslock v0.0.2
github.com/dolthub/go-mysql-server v0.10.1-0.20210615142209-01642e484029
github.com/dolthub/go-mysql-server v0.10.1-0.20210615195811-aec07a6e36d8
github.com/dolthub/ishell v0.0.0-20210205014355-16a4ce758446
github.com/dolthub/mmap-go v1.0.4-0.20201107010347-f9f2a9588a66
github.com/dolthub/sqllogictest/go v0.0.0-20201107003712-816f3ae12d81
+2 -2
View File
@@ -142,8 +142,8 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZm
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
github.com/dolthub/fslock v0.0.2 h1:8vUh47iKovgrtXNrXVIzsIoWLlspoXg+3nslhUzgKSw=
github.com/dolthub/fslock v0.0.2/go.mod h1:0i7bsNkK+XHwFL3dIsSWeXSV7sykVzzVr6+jq8oeEo0=
github.com/dolthub/go-mysql-server v0.10.1-0.20210615142209-01642e484029 h1:JrExsiNn5g9zqLHQTl59EeCgNFPGD5a5fSZYLZWSTUw=
github.com/dolthub/go-mysql-server v0.10.1-0.20210615142209-01642e484029/go.mod h1:51T7rtmujJjMfwvST6BxqQC4my/IpVbP7oLFGPO2x74=
github.com/dolthub/go-mysql-server v0.10.1-0.20210615195811-aec07a6e36d8 h1:9PJ+g7S2ay8kYu6b90oFEoESff8rMlNsQX+mFg/T8/4=
github.com/dolthub/go-mysql-server v0.10.1-0.20210615195811-aec07a6e36d8/go.mod h1:51T7rtmujJjMfwvST6BxqQC4my/IpVbP7oLFGPO2x74=
github.com/dolthub/ishell v0.0.0-20210205014355-16a4ce758446 h1:0ol5pj+QlKUKAtqs1LiPM3ZJKs+rHPgLSsMXmhTrCAM=
github.com/dolthub/ishell v0.0.0-20210205014355-16a4ce758446/go.mod h1:dhGBqcCEfK5kuFmeO5+WOx3hqc1k3M29c1oS/R7N4ms=
github.com/dolthub/mmap-go v1.0.4-0.20201107010347-f9f2a9588a66 h1:WRPDbpJWEnPxPmiuOTndT+lUWUeGjx6eoNOK9O4tQQQ=
@@ -38,6 +38,7 @@ var ErrExactlyOneToCommit = errors.New("dolt_commit_diff_* tables must be filter
var ErrExactlyOneFromCommit = errors.New("dolt_commit_diff_* tables must be filtered to a single 'from_commit'")
var _ sql.Table = (*CommitDiffTable)(nil)
var _ sql.FilteredTable = (*CommitDiffTable)(nil)
type CommitDiffTable struct {
name string
@@ -356,7 +357,7 @@ func (dt *CommitDiffTable) Filters() []sql.Expression {
}
// WithFilters returns a new sql.Table instance with the filters applied
func (dt *CommitDiffTable) WithFilters(filters []sql.Expression) sql.Table {
func (dt *CommitDiffTable) WithFilters(ctx *sql.Context, filters []sql.Expression) sql.Table {
return dt
}
@@ -55,6 +55,7 @@ func fromNamer(name string) string {
}
var _ sql.Table = (*DiffTable)(nil)
var _ sql.FilteredTable = (*DiffTable)(nil)
type DiffTable struct {
name string
@@ -176,7 +177,7 @@ func (dt *DiffTable) Filters() []sql.Expression {
}
// WithFilters returns a new sql.Table instance with the filters applied
func (dt *DiffTable) WithFilters(filters []sql.Expression) sql.Table {
func (dt *DiffTable) WithFilters(ctx *sql.Context, filters []sql.Expression) sql.Table {
if dt.partitionFilters == nil {
dt.partitionFilters, dt.rowFilters = splitPartitionFilters(filters)
}
@@ -45,7 +45,8 @@ const (
CommitDateCol = "commit_date"
)
var _ sql.Table = &HistoryTable{}
var _ sql.Table = (*HistoryTable)(nil)
var _ sql.FilteredTable = (*HistoryTable)(nil)
// HistoryTable is a system table that shows the history of rows over time
type HistoryTable struct {