Skip to content

Commit

Permalink
Merge pull request #8685 from dolthub/jennifer/table-function
Browse files Browse the repository at this point in the history
update TableFunction
  • Loading branch information
jennifersp authored Dec 17, 2024
2 parents 4777081 + e9167e0 commit ae30696
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion go/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ require (
github.com/cespare/xxhash/v2 v2.2.0
github.com/creasty/defaults v1.6.0
github.com/dolthub/flatbuffers/v23 v23.3.3-dh.2
github.com/dolthub/go-mysql-server v0.18.2-0.20241215013221-68ab2c34608f
github.com/dolthub/go-mysql-server v0.18.2-0.20241217205639-85adcd5e580f
github.com/dolthub/gozstd v0.0.0-20240423170813-23a2903bca63
github.com/dolthub/swiss v0.1.0
github.com/goccy/go-json v0.10.2
Expand Down
4 changes: 2 additions & 2 deletions go/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ github.com/dolthub/fslock v0.0.3 h1:iLMpUIvJKMKm92+N1fmHVdxJP5NdyDK5bK7z7Ba2s2U=
github.com/dolthub/fslock v0.0.3/go.mod h1:QWql+P17oAAMLnL4HGB5tiovtDuAjdDTPbuqx7bYfa0=
github.com/dolthub/go-icu-regex v0.0.0-20241215010122-db690dd53c90 h1:Sni8jrP0sy/w9ZYXoff4g/ixe+7bFCZlfCqXKJSU+zM=
github.com/dolthub/go-icu-regex v0.0.0-20241215010122-db690dd53c90/go.mod h1:ylU4XjUpsMcvl/BKeRRMXSH7e7WBrPXdSLvnRJYrxEA=
github.com/dolthub/go-mysql-server v0.18.2-0.20241215013221-68ab2c34608f h1:EuFYb8jtWGkZjF9oT4fmY/kviuneiGJb5H1Y9wpLDiU=
github.com/dolthub/go-mysql-server v0.18.2-0.20241215013221-68ab2c34608f/go.mod h1:elfIatfq2fkU5lqTBrTcpL0RcHZOgYPE8EzBD7yQFiY=
github.com/dolthub/go-mysql-server v0.18.2-0.20241217205639-85adcd5e580f h1:TTUk8P8Rt4YUrQ9A6yp91v5/kIlvWl30Mt3inK+V1Z4=
github.com/dolthub/go-mysql-server v0.18.2-0.20241217205639-85adcd5e580f/go.mod h1:elfIatfq2fkU5lqTBrTcpL0RcHZOgYPE8EzBD7yQFiY=
github.com/dolthub/gozstd v0.0.0-20240423170813-23a2903bca63 h1:OAsXLAPL4du6tfbBgK0xXHZkOlos63RdKYS3Sgw/dfI=
github.com/dolthub/gozstd v0.0.0-20240423170813-23a2903bca63/go.mod h1:lV7lUeuDhH5thVGDCKXbatwKy2KW80L4rMT46n+Y2/Q=
github.com/dolthub/ishell v0.0.0-20240701202509-2b217167d718 h1:lT7hE5k+0nkBdj/1UOSFwjWpNxf+LCApbRHgnCA17XE=
Expand Down
7 changes: 3 additions & 4 deletions go/libraries/doltcore/sqle/database_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -1414,12 +1414,11 @@ func (p *DoltDatabaseProvider) ExternalStoredProcedures(_ *sql.Context, name str
}

// TableFunction implements the sql.TableFunctionProvider interface
func (p *DoltDatabaseProvider) TableFunction(_ *sql.Context, name string) (sql.TableFunction, error) {
func (p *DoltDatabaseProvider) TableFunction(_ *sql.Context, name string) (sql.TableFunction, bool) {
if fun, ok := p.tableFunctions[strings.ToLower(name)]; ok {
return fun, nil
return fun, true
}

return nil, sql.ErrTableFunctionNotFound.New(name)
return nil, false
}

// ensureReplicaHeadExists tries to pull the latest version of a remote branch. Will fail if the branch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ func (ltf *LogTableFunction) Name() string {
// Resolved implements the sql.Resolvable interface
func (ltf *LogTableFunction) Resolved() bool {
for _, expr := range ltf.revisionExprs {
return expr.Resolved()
if !expr.Resolved() {
return false
}
}
return true
}
Expand Down

0 comments on commit ae30696

Please sign in to comment.