Skip to content

Commit

Permalink
Add docstrings.
Browse files Browse the repository at this point in the history
  • Loading branch information
nicktobey committed Aug 14, 2023
1 parent 470c2f1 commit 4be5ccc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sql/plan/indexed_table_access.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ var ErrNoIndexableTable = errors.NewKind("expected an IndexableTable, couldn't f
var ErrNoIndexedTableAccess = errors.NewKind("expected an IndexedTableAccess, couldn't find one in %v")
var ErrInvalidLookupForIndexedTable = errors.NewKind("indexable table does not support given lookup: %s")

// TableNode is an interface for nodes that are also tables. A node that implements this interface exposes all the
// information needed for filters on the table to be optimized into indexes. This is possible when the return value
// of `UnderlyingTable` is a table that implements `sql.IndexAddressable`
type TableNode interface {
sql.Table
sql.Node
Expand Down
1 change: 1 addition & 0 deletions sql/plan/resolved_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ type ResolvedTable struct {
comment string
}

// UnderlyingTable returns the table wrapped by the ResolvedTable.
func (t *ResolvedTable) UnderlyingTable() sql.Table {
if w, ok := t.Table.(sql.TableWrapper); ok {
return w.Underlying()
Expand Down

0 comments on commit 4be5ccc

Please sign in to comment.