From 723c3a0f724b66458a440427bc1b32e8a7cbd70b Mon Sep 17 00:00:00 2001 From: Jakub Martin Date: Sat, 11 Dec 2021 21:49:58 +0100 Subject: [PATCH] Minor rename refactor. --- database.go | 2 +- physical.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/database.go b/database.go index 18105f3..e040af6 100644 --- a/database.go +++ b/database.go @@ -72,7 +72,7 @@ func (d *Database) GetTable(ctx context.Context, name string) (physical.Datasour } } - return &datasourceImpl{ + return &datasourcePhysical{ internalName: internalName, }, physical.Schema{ diff --git a/physical.go b/physical.go index 86d673f..00310f1 100644 --- a/physical.go +++ b/physical.go @@ -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) @@ -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 }