diff --git a/examples/udtf/main.go b/examples/udtf/main.go index ce89f2cf..90e2f2d8 100644 --- a/examples/udtf/main.go +++ b/examples/udtf/main.go @@ -24,10 +24,11 @@ func BindTableUDF(namedArgs map[string]any, args ...interface{}) (duckdb.RowTabl }, nil } -func (d *tableUDF) Columns() ([]duckdb.ColumnMetaData, error) { +func (d *tableUDF) Columns() []duckdb.ColumnMetaData { + t, _ := duckdb.NewTypeInfo(duckdb.TYPE_BIGINT) return []duckdb.ColumnMetaData{ - {Name: "result", T: duckdb.NewDuckdbType[int64]()}, - }, nil + {Name: "result", T: t}, + } } func (d *tableUDF) Init() {} @@ -56,11 +57,11 @@ func main() { } defer db.Close() conn, _ := db.Conn(context.Background()) + + t, _ := duckdb.NewTypeInfo(duckdb.TYPE_BIGINT) fun := duckdb.RowTableFunction{ Config: duckdb.TableFunctionConfig{ - Arguments: []duckdb.Type{ - duckdb.NewDuckdbType[int64](), - }, + Arguments: []duckdb.TypeInfo{t}, }, BindArguments: BindTableUDF, }