Uploaded image for project: 'Apache Sedona'
  1. Apache Sedona
  2. SEDONA-628

Python DataFrame Functions Cannot Be Imported As Documented

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 1.6.1

    Description

      running the example from the documentation returns an error.

      The following code

      from pyspark.sql import functions as f
      
      from sedona.spark import *
      
      df = spark.sql("SELECT array(0.0, 1.0, 2.0) AS values")
      
      min_value = f.array_min("values")
      max_value = f.array_max("values")
      
      df = df.select(ST_Point(min_value, max_value).alias("point"))
      

      returns the error: NameError: name 'ST_Point' is not defined

      I tested several other functions from predicates, functions, and constructors with the same result.

      From my testing from sedona.sql.st_constructors import ST_Point works, but from sedona.sql.st_constructors import * does not

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              james-wherobots James Willis
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h