Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DuckDB with backup on GCS #6006

Merged
merged 85 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
41fbea9
initial commit
k-anshul Oct 29, 2024
854a666
use latest replicator version
k-anshul Oct 30, 2024
c86ed09
transporter changes
k-anshul Nov 1, 2024
c7fd731
fixed transporters
k-anshul Nov 1, 2024
c411c9f
set backup directory
k-anshul Nov 4, 2024
9330a7a
test fixes
k-anshul Nov 4, 2024
a1d4a10
lint fixes
k-anshul Nov 5, 2024
b27121c
postgres tests fix
k-anshul Nov 5, 2024
089d417
self review
k-anshul Nov 5, 2024
1a4c2b2
Merge remote-tracking branch 'origin/main' into duckdb_gcs
k-anshul Nov 6, 2024
279d207
Import
begelundmuller Nov 8, 2024
05a0603
Remove go.mod
begelundmuller Nov 8, 2024
13653fd
use single local directory
k-anshul Nov 11, 2024
e9a8c6c
use metadata.json for each table
k-anshul Nov 15, 2024
0acae1c
use semaphore instead of mutex for write locks
k-anshul Nov 18, 2024
9a6f9e6
local db monitor
k-anshul Nov 18, 2024
eac6d1b
small fixes
k-anshul Nov 18, 2024
6bd2177
Merge branch 'begelundmuller/import-duckdb-replicator' into duckdb_gcs
k-anshul Nov 18, 2024
ad95df0
add data bucket
k-anshul Nov 19, 2024
11203b4
fix snowflake
k-anshul Nov 19, 2024
09424ba
non blocking read handle updates
k-anshul Nov 20, 2024
3b0eee7
use tableMeta plus minor fix
k-anshul Nov 20, 2024
50660ce
small cleanups
k-anshul Nov 21, 2024
365f484
use a catalog to manage table lifecyle
k-anshul Nov 25, 2024
2c3b485
use catalog to check if table exists
k-anshul Nov 25, 2024
c7ebb0b
Merge remote-tracking branch 'origin/main' into begelundmuller/import…
k-anshul Nov 25, 2024
c369e09
add concurrent access unit tests
k-anshul Nov 25, 2024
1f59235
minor tweaks
k-anshul Nov 26, 2024
a390746
data bucket for persisting data to gcs
k-anshul Nov 26, 2024
5325252
test fix
k-anshul Nov 26, 2024
953247d
also prefix with driver
k-anshul Nov 26, 2024
b10cfab
merge with main
k-anshul Nov 26, 2024
5585e3b
close bucket plus directory prefix
k-anshul Nov 26, 2024
d3bfbb6
bucket is closed when prefixed so need to open new data bucket all times
k-anshul Nov 26, 2024
3d5fe90
Merge remote-tracking branch 'origin/main' into begelundmuller/import…
k-anshul Nov 27, 2024
e5094c4
Merge branch 'begelundmuller/import-duckdb-replicator' into duckdb_gcs
k-anshul Nov 27, 2024
f51a2b1
Update runtime/pkg/rduckdb/db.go
k-anshul Nov 28, 2024
5732e6e
remove ctx cancellation from catalog
k-anshul Nov 29, 2024
154ed02
close fix
k-anshul Nov 29, 2024
e3ccead
small renames
k-anshul Nov 29, 2024
86aaf2a
view fix
k-anshul Nov 29, 2024
5fcc934
add a storage client and remove preset data_dir
k-anshul Dec 2, 2024
539b481
lint fixes
k-anshul Dec 2, 2024
3f86e55
small refactor
k-anshul Dec 2, 2024
1907725
Apply suggestions from code review
k-anshul Dec 2, 2024
ea8040c
name in connection cache
k-anshul Dec 2, 2024
e4b216f
fix build errors
k-anshul Dec 2, 2024
2566537
transporters fixed
k-anshul Dec 2, 2024
bbc4625
Merge branch 'data_bucket' into duckdb_gcs
k-anshul Dec 2, 2024
214242a
Merge remote-tracking branch 'origin/main' into duckdb_gcs
k-anshul Dec 2, 2024
f1caa8f
Merge branch 'begelundmuller/import-duckdb-replicator' into duckdb_gcs
k-anshul Dec 2, 2024
2ec4780
rename fix
k-anshul Dec 3, 2024
dabed2c
Merge remote-tracking branch 'origin/main' into begelundmuller/import…
k-anshul Dec 3, 2024
ebfd0ba
dsn fix
k-anshul Dec 3, 2024
f2631a2
Merge branch 'begelundmuller/import-duckdb-replicator' into duckdb_gcs
k-anshul Dec 3, 2024
e6d30cd
write should acquire snapshot
k-anshul Dec 3, 2024
e90409c
Merge branch 'begelundmuller/import-duckdb-replicator' into duckdb_gcs
k-anshul Dec 3, 2024
b462a96
missing withprefix
k-anshul Dec 3, 2024
ccc5729
storage APIs also create directories
k-anshul Dec 3, 2024
84fcf1c
Merge remote-tracking branch 'origin/main' into data_bucket
k-anshul Dec 3, 2024
84b4f59
fix and add unit test
k-anshul Dec 3, 2024
590dee8
pullFromRemote fix and other review comments
k-anshul Dec 4, 2024
385652f
some more tests
k-anshul Dec 4, 2024
ed7fd81
remove invalid tables
k-anshul Dec 4, 2024
952651a
use unique directory in temp directory
k-anshul Dec 4, 2024
d46a38f
Merge branch 'begelundmuller/import-duckdb-replicator' into duckdb_gcs
k-anshul Dec 4, 2024
754c3ba
Merge branch 'data_bucket' into duckdb_gcs
k-anshul Dec 4, 2024
788a459
interim commit
k-anshul Dec 4, 2024
6befdc8
Merge remote-tracking branch 'origin/main' into duckdb_gcs
k-anshul Dec 4, 2024
43e4b4f
Merge remote-tracking branch 'origin/main' into duckdb_gcs
k-anshul Dec 4, 2024
c601937
remove isview param
k-anshul Dec 5, 2024
d863e2c
Merge remote-tracking branch 'origin/main' into duckdb_gcs
k-anshul Dec 5, 2024
c609613
fix some more tests
k-anshul Dec 5, 2024
5b4148b
Merge remote-tracking branch 'origin/main' into duckdb_gcs
k-anshul Dec 5, 2024
770f759
reopen db in a separate goroutine
k-anshul Dec 6, 2024
da86f4f
fix more tests
k-anshul Dec 7, 2024
2af27c0
Merge remote-tracking branch 'origin/main' into duckdb_gcs
k-anshul Dec 7, 2024
8842b70
more cleanups
k-anshul Dec 9, 2024
5e1b2cb
Merge remote-tracking branch 'origin/main' into duckdb_gcs
k-anshul Dec 9, 2024
1f1ddfa
small background task fix
k-anshul Dec 9, 2024
584bfba
add backward compatibility
k-anshul Dec 10, 2024
f44cbcd
Merge remote-tracking branch 'origin/main' into duckdb_gcs
k-anshul Dec 10, 2024
058c21a
review comments
k-anshul Dec 13, 2024
56f4e0b
custom temp and secret directory
k-anshul Dec 13, 2024
f45c379
remove custom temp directory
k-anshul Dec 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 3 additions & 28 deletions cli/pkg/local/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"net/http"
"os"
"path/filepath"
"strconv"
"time"

"github.com/c2h5oh/datasize"
Expand Down Expand Up @@ -197,26 +196,13 @@ func NewApp(ctx context.Context, opts *AppOptions) (*App, error) {
}
}

// If the OLAP is the default OLAP (DuckDB in stage.db), we make it relative to the project directory (not the working directory)
defaultOLAP := false
olapCfg := make(map[string]string)
if opts.OlapDriver == DefaultOLAPDriver && opts.OlapDSN == DefaultOLAPDSN {
defaultOLAP = true
val, err := isExternalStorageEnabled(vars)
if err != nil {
return nil, err
}
olapCfg["external_table_storage"] = strconv.FormatBool(val)
}

if opts.OlapDriver == "duckdb" {
if opts.OlapDSN != DefaultOLAPDSN {
return nil, fmt.Errorf("setting DSN for DuckDB is not supported")
}
// Set default DuckDB pool size to 4
olapCfg["pool_size"] = "4"
if !defaultOLAP {
// dsn is automatically computed by duckdb driver so we set only when non default dsn is passed
olapCfg["dsn"] = opts.OlapDSN
olapCfg["error_on_incompatible_version"] = "true"
}
}

// Add OLAP connector
Expand Down Expand Up @@ -609,14 +595,3 @@ func (s skipFieldZapEncoder) AddString(key, val string) {
s.Encoder.AddString(key, val)
}
}

// isExternalStorageEnabled determines if external storage can be enabled.
func isExternalStorageEnabled(variables map[string]string) (bool, error) {
// check if flag explicitly passed
val, ok := variables["connector.duckdb.external_table_storage"]
if !ok {
// mark enabled by default
return true, nil
}
return strconv.ParseBool(val)
}
51 changes: 3 additions & 48 deletions runtime/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
runtimev1 "github.com/rilldata/rill/proto/gen/rill/runtime/v1"
"github.com/rilldata/rill/runtime"
"github.com/rilldata/rill/runtime/compilers/rillv1"
"github.com/rilldata/rill/runtime/drivers"
"github.com/rilldata/rill/runtime/testruntime"
"github.com/stretchr/testify/require"
"google.golang.org/protobuf/types/known/structpb"
Expand Down Expand Up @@ -246,7 +245,7 @@ path: data/foo.csv
// Delete the underlying table
olap, release, err := rt.OLAP(context.Background(), id, "")
require.NoError(t, err)
err = olap.Exec(context.Background(), &drivers.Statement{Query: "DROP TABLE foo;"})
err = olap.DropTable(context.Background(), "foo")
require.NoError(t, err)
release()
testruntime.RequireNoOLAPTable(t, rt, id, "foo")
Expand Down Expand Up @@ -492,7 +491,8 @@ select 1
testruntime.ReconcileParserAndWait(t, rt, id)
testruntime.RequireReconcileState(t, rt, id, 2, 0, 0)
// Assert that the model is a table now
testruntime.RequireIsView(t, olap, "bar", false)
// TODO : fix with information schema fix
// testruntime.RequireIsView(t, olap, "bar", false)

// Mark the model as not materialized
testruntime.PutFiles(t, rt, id, map[string]string{
Expand All @@ -507,51 +507,6 @@ select 1
testruntime.RequireIsView(t, olap, "bar", true)
}

func TestModelCTE(t *testing.T) {
// Create a model that references a source
rt, id := testruntime.NewInstance(t)
testruntime.PutFiles(t, rt, id, map[string]string{
"/data/foo.csv": `a,b,c,d,e
1,2,3,4,5
1,2,3,4,5
1,2,3,4,5
`,
"/sources/foo.yaml": `
connector: local_file
path: data/foo.csv
`,
"/models/bar.sql": `SELECT * FROM foo`,
})
testruntime.ReconcileParserAndWait(t, rt, id)
testruntime.RequireReconcileState(t, rt, id, 3, 0, 0)
model, modelRes := newModel("SELECT * FROM foo", "bar", "foo")
testruntime.RequireResource(t, rt, id, modelRes)
testruntime.RequireOLAPTable(t, rt, id, "bar")

// Update model to have a CTE with alias different from the source
testruntime.PutFiles(t, rt, id, map[string]string{
"/models/bar.sql": `with CTEAlias as (select * from foo) select * from CTEAlias`,
})
testruntime.ReconcileParserAndWait(t, rt, id)
testruntime.RequireReconcileState(t, rt, id, 3, 0, 0)
model.Spec.InputProperties = must(structpb.NewStruct(map[string]any{"sql": `with CTEAlias as (select * from foo) select * from CTEAlias`}))
testruntime.RequireResource(t, rt, id, modelRes)
testruntime.RequireOLAPTable(t, rt, id, "bar")

// Update model to have a CTE with alias same as the source
testruntime.PutFiles(t, rt, id, map[string]string{
"/models/bar.sql": `with foo as (select * from memory.foo) select * from foo`,
})
testruntime.ReconcileParserAndWait(t, rt, id)
testruntime.RequireReconcileState(t, rt, id, 3, 0, 0)
model.Spec.InputProperties = must(structpb.NewStruct(map[string]any{"sql": `with foo as (select * from memory.foo) select * from foo`}))
modelRes.Meta.Refs = []*runtimev1.ResourceName{}
testruntime.RequireResource(t, rt, id, modelRes)
// Refs are removed but the model is valid.
// TODO: is this expected?
testruntime.RequireOLAPTable(t, rt, id, "bar")
}

func TestRename(t *testing.T) {
// Rename model A to B and model B to A, verify success
// Rename model A to B and source B to A, verify success
Expand Down
5 changes: 0 additions & 5 deletions runtime/drivers/admin/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,11 +237,6 @@ func (h *Handle) AsTransporter(from, to drivers.Handle) (drivers.Transporter, bo
return nil, false
}

// AsSQLStore implements drivers.Handle.
func (h *Handle) AsSQLStore() (drivers.SQLStore, bool) {
return nil, false
}

// AsNotifier implements drivers.Handle.
func (h *Handle) AsNotifier(properties map[string]any) (drivers.Notifier, error) {
return nil, drivers.ErrNotNotifier
Expand Down
5 changes: 0 additions & 5 deletions runtime/drivers/athena/athena.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,6 @@ func (c *Connection) AsWarehouse() (drivers.Warehouse, bool) {
return c, true
}

// AsSQLStore implements drivers.Connection.
func (c *Connection) AsSQLStore() (drivers.SQLStore, bool) {
return nil, false
}

// AsNotifier implements drivers.Handle.
func (c *Connection) AsNotifier(properties map[string]any) (drivers.Notifier, error) {
return nil, drivers.ErrNotNotifier
Expand Down
5 changes: 0 additions & 5 deletions runtime/drivers/azure/azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,6 @@ func (c *Connection) AsWarehouse() (drivers.Warehouse, bool) {
return nil, false
}

// AsSQLStore implements drivers.Connection.
func (c *Connection) AsSQLStore() (drivers.SQLStore, bool) {
return nil, false
}

// AsNotifier implements drivers.Connection.
func (c *Connection) AsNotifier(properties map[string]any) (drivers.Notifier, error) {
return nil, drivers.ErrNotNotifier
Expand Down
5 changes: 0 additions & 5 deletions runtime/drivers/bigquery/bigquery.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,6 @@ func (c *Connection) AsObjectStore() (drivers.ObjectStore, bool) {
return nil, false
}

// AsSQLStore implements drivers.Connection.
func (c *Connection) AsSQLStore() (drivers.SQLStore, bool) {
return nil, false
}

// AsModelExecutor implements drivers.Handle.
func (c *Connection) AsModelExecutor(instanceID string, opts *drivers.ModelExecutorOptions) (drivers.ModelExecutor, bool) {
return nil, false
Expand Down
6 changes: 0 additions & 6 deletions runtime/drivers/clickhouse/clickhouse.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,12 +379,6 @@ func (c *connection) AsWarehouse() (drivers.Warehouse, bool) {
return nil, false
}

// AsSQLStore implements drivers.Connection.
// Use OLAPStore instead.
func (c *connection) AsSQLStore() (drivers.SQLStore, bool) {
return nil, false
}

// AsNotifier implements drivers.Connection.
func (c *connection) AsNotifier(properties map[string]any) (drivers.Notifier, error) {
return nil, drivers.ErrNotNotifier
Expand Down
8 changes: 3 additions & 5 deletions runtime/drivers/clickhouse/model_executor_localfile_self.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,12 @@ func (e *localFileToSelfExecutor) Execute(ctx context.Context, opts *drivers.Mod
if opts.Env.StageChanges || outputProps.Typ == "DICTIONARY" {
stagingTableName = stagingTableNameFor(tableName)
}
if t, err := e.c.InformationSchema().Lookup(ctx, "", "", stagingTableName); err == nil {
_ = e.c.DropTable(ctx, stagingTableName, t.View)
}
_ = e.c.DropTable(ctx, stagingTableName)

// create the table
err = e.c.createTable(ctx, stagingTableName, "", outputProps)
if err != nil {
_ = e.c.DropTable(ctx, stagingTableName, false)
_ = e.c.DropTable(ctx, stagingTableName)
return nil, fmt.Errorf("failed to create model: %w", err)
}

Expand All @@ -131,7 +129,7 @@ func (e *localFileToSelfExecutor) Execute(ctx context.Context, opts *drivers.Mod
if outputProps.Typ == "DICTIONARY" {
err = e.c.createDictionary(ctx, tableName, fmt.Sprintf("SELECT * FROM %s", safeSQLName(stagingTableName)), outputProps)
// drop the temp table
_ = e.c.DropTable(ctx, stagingTableName, false)
_ = e.c.DropTable(ctx, stagingTableName)
if err != nil {
return nil, fmt.Errorf("failed to create dictionary: %w", err)
}
Expand Down
6 changes: 2 additions & 4 deletions runtime/drivers/clickhouse/model_executor_self.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,12 @@ func (e *selfToSelfExecutor) Execute(ctx context.Context, opts *drivers.ModelExe

// Drop the staging view/table if it exists.
// NOTE: This intentionally drops the end table if not staging changes.
if t, err := e.c.InformationSchema().Lookup(ctx, "", "", stagingTableName); err == nil {
_ = e.c.DropTable(ctx, stagingTableName, t.View)
}
_ = e.c.DropTable(ctx, stagingTableName)

// Create the table
err := e.c.CreateTableAsSelect(ctx, stagingTableName, asView, inputProps.SQL, mustToMap(outputProps))
if err != nil {
_ = e.c.DropTable(ctx, stagingTableName, asView)
_ = e.c.DropTable(ctx, stagingTableName)
return nil, fmt.Errorf("failed to create model: %w", err)
}

Expand Down
11 changes: 4 additions & 7 deletions runtime/drivers/clickhouse/model_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,17 +202,14 @@ func (c *connection) Delete(ctx context.Context, res *drivers.ModelResult) error
return fmt.Errorf("connector is not an OLAP")
}

stagingTable, err := olap.InformationSchema().Lookup(ctx, "", "", stagingTableNameFor(res.Table))
if err == nil {
_ = c.DropTable(ctx, stagingTable.Name, stagingTable.View)
}
_ = c.DropTable(ctx, stagingTableNameFor(res.Table))

table, err := olap.InformationSchema().Lookup(ctx, "", "", res.Table)
if err != nil {
return err
}

return c.DropTable(ctx, table.Name, table.View)
return c.DropTable(ctx, table.Name)
}

func (c *connection) MergePartitionResults(a, b *drivers.ModelResult) (*drivers.ModelResult, error) {
Expand Down Expand Up @@ -250,15 +247,15 @@ func olapForceRenameTable(ctx context.Context, c *connection, fromName string, f
// Renaming a table to the same name with different casing is not supported. Workaround by renaming to a temporary name first.
if strings.EqualFold(fromName, toName) {
tmpName := fmt.Sprintf("__rill_tmp_rename_%s_%s", typ, toName)
err := c.RenameTable(ctx, fromName, tmpName, fromIsView)
err := c.RenameTable(ctx, fromName, tmpName)
if err != nil {
return err
}
fromName = tmpName
}

// Do the rename
return c.RenameTable(ctx, fromName, toName, fromIsView)
return c.RenameTable(ctx, fromName, toName)
}

func boolPtr(b bool) *bool {
Expand Down
8 changes: 4 additions & 4 deletions runtime/drivers/clickhouse/olap.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func (c *connection) Dialect() drivers.Dialect {
return drivers.DialectClickHouse
}

func (c *connection) WithConnection(ctx context.Context, priority int, longRunning, tx bool, fn drivers.WithConnectionFunc) error {
func (c *connection) WithConnection(ctx context.Context, priority int, longRunning bool, fn drivers.WithConnectionFunc) error {
// Check not nested
if connFromContext(ctx) != nil {
panic("nested WithConnection")
Expand Down Expand Up @@ -330,7 +330,7 @@ func (c *connection) InsertTableAsSelect(ctx context.Context, name, sql string,
}

// DropTable implements drivers.OLAPStore.
func (c *connection) DropTable(ctx context.Context, name string, _ bool) error {
func (c *connection) DropTable(ctx context.Context, name string) error {
typ, onCluster, err := informationSchema{c: c}.entityType(ctx, "", name)
if err != nil {
return err
Expand Down Expand Up @@ -384,7 +384,7 @@ func (c *connection) MayBeScaledToZero(ctx context.Context) bool {
}

// RenameTable implements drivers.OLAPStore.
func (c *connection) RenameTable(ctx context.Context, oldName, newName string, view bool) error {
func (c *connection) RenameTable(ctx context.Context, oldName, newName string) error {
typ, onCluster, err := informationSchema{c: c}.entityType(ctx, "", oldName)
if err != nil {
return err
Expand Down Expand Up @@ -514,7 +514,7 @@ func (c *connection) renameTable(ctx context.Context, oldName, newName, onCluste
return err
}
// drop the old table
return c.DropTable(context.Background(), oldName, false)
return c.DropTable(context.Background(), oldName)
}

func (c *connection) createTable(ctx context.Context, name, sql string, outputProps *ModelOutputProperties) error {
Expand Down
12 changes: 6 additions & 6 deletions runtime/drivers/clickhouse/olap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ func testRenameView(t *testing.T, olap drivers.OLAPStore) {
require.NoError(t, err)

// rename to unknown view
err = olap.RenameTable(ctx, "foo_view", "foo_view1", true)
err = olap.RenameTable(ctx, "foo_view", "foo_view1")
require.NoError(t, err)

// rename to existing view
err = olap.RenameTable(ctx, "foo_view1", "bar_view", true)
err = olap.RenameTable(ctx, "foo_view1", "bar_view")
require.NoError(t, err)

// check that views no longer exist
Expand All @@ -89,10 +89,10 @@ func testRenameView(t *testing.T, olap drivers.OLAPStore) {

func testRenameTable(t *testing.T, olap drivers.OLAPStore) {
ctx := context.Background()
err := olap.RenameTable(ctx, "foo", "foo1", false)
err := olap.RenameTable(ctx, "foo", "foo1")
require.NoError(t, err)

err = olap.RenameTable(ctx, "foo1", "bar", false)
err = olap.RenameTable(ctx, "foo1", "bar")
require.NoError(t, err)

notExists(t, olap, "foo")
Expand Down Expand Up @@ -250,7 +250,7 @@ func testDictionary(t *testing.T, olap drivers.OLAPStore) {
err := olap.CreateTableAsSelect(context.Background(), "dict", false, "SELECT 1 AS id, 'Earth' AS planet", map[string]any{"table": "Dictionary", "primary_key": "id"})
require.NoError(t, err)

err = olap.RenameTable(context.Background(), "dict", "dict1", false)
err = olap.RenameTable(context.Background(), "dict", "dict1")
require.NoError(t, err)

res, err := olap.Execute(context.Background(), &drivers.Statement{Query: "SELECT id, planet FROM dict1"})
Expand All @@ -263,7 +263,7 @@ func testDictionary(t *testing.T, olap drivers.OLAPStore) {
require.Equal(t, 1, id)
require.Equal(t, "Earth", planet)

require.NoError(t, olap.DropTable(context.Background(), "dict1", false))
require.NoError(t, olap.DropTable(context.Background(), "dict1"))
}

func testIntervalType(t *testing.T, olap drivers.OLAPStore) {
Expand Down
4 changes: 0 additions & 4 deletions runtime/drivers/drivers.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,6 @@ type Handle interface {
// An AI service enables an instance to request prompt-based text inference.
AsAI(instanceID string) (AIService, bool)

// AsSQLStore returns a SQLStore if the driver can serve as such, otherwise returns false.
// A SQL store represents a service that can execute SQL statements and return the resulting rows.
AsSQLStore() (SQLStore, bool)

// AsOLAP returns an OLAPStore if the driver can serve as such, otherwise returns false.
// An OLAP store is used to serve interactive, low-latency, analytical queries.
// NOTE: We should consider merging the OLAPStore and SQLStore interfaces.
Expand Down
6 changes: 0 additions & 6 deletions runtime/drivers/druid/druid.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,12 +254,6 @@ func (c *connection) AsWarehouse() (drivers.Warehouse, bool) {
return nil, false
}

// AsSQLStore implements drivers.Connection.
// Use OLAPStore instead.
func (c *connection) AsSQLStore() (drivers.SQLStore, bool) {
return nil, false
}

// AsNotifier implements drivers.Connection.
func (c *connection) AsNotifier(properties map[string]any) (drivers.Notifier, error) {
return nil, drivers.ErrNotNotifier
Expand Down
Loading
Loading