Skip to content

Commit

Permalink
update TableFunction
Browse files Browse the repository at this point in the history
  • Loading branch information
jennifersp committed Dec 17, 2024
1 parent 4777081 commit 463005a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 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.20241217004611-eca5bf76f8f0
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.20241217004611-eca5bf76f8f0 h1:tO2IZQKGl/EnA3gVUqoyhyLc/Wasqe2XDt1l7bRFN+U=
github.com/dolthub/go-mysql-server v0.18.2-0.20241217004611-eca5bf76f8f0/go.mod h1:QedjnglQ9+7yeRz4jAseFVZZgTxIZhEdt9G4RGqv4Jc=
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

0 comments on commit 463005a

Please sign in to comment.