Skip to content

Support for posexplode #352

@djouallah

Description

@djouallah

Trying to port this script from Spark to sqlframe, and I am getting this error

https://colab.research.google.com/drive/15CK2fB3G1fmB04dEZOcT-F2kuYRoSBpH?usp=sharing#scrollTo=Basev2-ohQAP

WARNING:sqlframe.base.session:numPartitions is not supported
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
[<ipython-input-4-04b5098af251>](https://localhost:8080/#) in <cell line: 0>()
     69     base_df
     70     .withColumn("line_array", F.expr("sequence(1, Num_Lines)"))
---> 71     .select("*", F.posexplode("line_array").alias("Line_Pos", "Line_Val"))
     72     .drop("line_array", "Num_Lines")
     73     .withColumn("Order_Line_ID", F.concat(F.col("Order_ID"), F.lit("_"), F.col("Line_Val")))

AttributeError: module 'sqlframe.duckdb.functions' has no attribute 'posexplode'

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions