Skip to content

Commit

Permalink
Minor rename refactor.
Browse files Browse the repository at this point in the history
  • Loading branch information
cube2222 committed Dec 11, 2021
1 parent 7a01d30 commit 723c3a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion database.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func (d *Database) GetTable(ctx context.Context, name string) (physical.Datasour
}
}

return &datasourceImpl{
return &datasourcePhysical{
internalName: internalName,
},
physical.Schema{
Expand Down
6 changes: 3 additions & 3 deletions physical.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import (
"github.com/cube2222/octosql/physical"
)

type datasourceImpl struct {
type datasourcePhysical struct {
internalName string
}

func (i *datasourceImpl) Materialize(ctx context.Context, env physical.Environment, schema physical.Schema, pushedDownPredicates []physical.Expression) (execution.Node, error) {
func (i *datasourcePhysical) Materialize(ctx context.Context, env physical.Environment, schema physical.Schema, pushedDownPredicates []physical.Expression) (execution.Node, error) {
req, err := http.NewRequest("GET", fmt.Sprintf("https://random-data-api.com/api/%s?size=%d", i.internalName, rand.Intn(80)+10), nil)
if err != nil {
return nil, fmt.Errorf("couldn't create request to get data: %w", err)
Expand All @@ -38,6 +38,6 @@ func (i *datasourceImpl) Materialize(ctx context.Context, env physical.Environme
}, nil
}

func (i *datasourceImpl) PushDownPredicates(newPredicates, pushedDownPredicates []physical.Expression) (rejected, pushedDown []physical.Expression, changed bool) {
func (i *datasourcePhysical) PushDownPredicates(newPredicates, pushedDownPredicates []physical.Expression) (rejected, pushedDown []physical.Expression, changed bool) {
return newPredicates, []physical.Expression{}, false
}

0 comments on commit 723c3a0

Please sign in to comment.