-
Notifications
You must be signed in to change notification settings - Fork 23
Closed
Description
Running this:
import sqlframe
sqlframe.activate('duckdb')
from pyspark.sql import SparkSession
import pyspark.sql.functions as F
session = SparkSession.builder.getOrCreate()
data = {"a": [[3, None, 2, 4, None]]}
rows = [{key: value[i] for key, value in data.items()} for i in range(len(data[next(iter(data.keys()))]))]
df = session.createDataFrame(rows)
df = df.withColumn("a_reversed", F.reverse("a"))
df.show()outputs the following error:
duckdb.duckdb.BinderException: Binder Error: No function matches the given name and argument types 'reverse(BIGINT[])'. You might need to add explicit type casts.
Candidate functions:
reverse(VARCHAR) -> VARCHAR
LINE 1: ..., 2, 4, NULL])) AS "a1"("a")), "t18827629" AS (SELECT "a", REVERSE("a") AS "a_reversed" FROM "t70656272") SELECT "a...
Name: sqlframe
Version: 3.43.8
Name: duckdb
Version: 1.3.0
Metadata
Metadata
Assignees
Labels
No labels