This is an automated email from the ASF dual-hosted git repository.
mgrund pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark-connect-go.git
The following commit(s) were added to refs/heads/master by this push:
new 60b1610 Fix broken build
60b1610 is described below
commit 60b1610fc6c6597efedcb3d09293d9f71bd4a21b
Author: Martin Grund <[email protected]>
AuthorDate: Wed Jan 1 22:32:31 2025 +0100
Fix broken build
### What changes were proposed in this pull request?
Fix a broken build from stale CI.
### Why are the changes needed?
Fix
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
Existing tests
Closes #102 from grundprinzip/fix_build.
Authored-by: Martin Grund <[email protected]>
Signed-off-by: Martin Grund <[email protected]>
---
internal/tests/integration/functions_test.go | 4 +++-
spark/sql/column/column.go | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/internal/tests/integration/functions_test.go
b/internal/tests/integration/functions_test.go
index c620fd3..b286c02 100644
--- a/internal/tests/integration/functions_test.go
+++ b/internal/tests/integration/functions_test.go
@@ -19,6 +19,8 @@ import (
"context"
"testing"
+ "github.com/apache/spark-connect-go/v35/spark/sql/types"
+
"github.com/apache/spark-connect-go/v35/spark/sql/functions"
"github.com/apache/spark-connect-go/v35/spark/sql"
@@ -47,7 +49,7 @@ func TestIntegration_ColumnGetItem(t *testing.T) {
}
df, _ := spark.Sql(ctx, "select sequence(1,10) as s")
- df, err = df.Select(ctx, functions.Col("s").GetItem(2))
+ df, err = df.Select(ctx, functions.Col("s").GetItem(types.Int64(2)))
assert.NoError(t, err)
res, err := df.Collect(ctx)
assert.NoError(t, err)
diff --git a/spark/sql/column/column.go b/spark/sql/column/column.go
index b0b3b87..8dd93bd 100644
--- a/spark/sql/column/column.go
+++ b/spark/sql/column/column.go
@@ -77,7 +77,7 @@ func (c Column) Desc() Column {
})
}
-func (c Column) GetItem(key any) Column {
+func (c Column) GetItem(key types.LiteralType) Column {
return NewColumn(NewUnresolvedExtractValue("getItem", c.expr,
NewLiteral(key)))
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]