zero-one-group / geni

A Clojure dataframe library that runs on Spark
Apache License 2.0
281 stars 28 forks source link

Possible issue with example 2.5 from cookbook #330

Open bhougland18 opened 3 years ago

bhougland18 commented 3 years ago

Info

Info Value
Operating System Nixos 21.09
Geni Version 0.0.38
JDK openjdk version 11.0.9 2020-10-20
Spark Version 3.1.0

Problem / Steps to reproduce

I am working through the cookbook and encountered an error on example 2.5 https://github.com/zero-one-group/geni/blob/develop/docs/cookbook/part_02_selecting_rows_and_columns.md#25-selecting-only-noise-complaints

I entered in the following:

(-> complaints
    (g/filter (g/= :complaint-type (g/lit "Noise - Street/Sidewalk")))
    (g/select :complaint-type :borough :created-date :descriptor)
    (g/limit 3)
    g/show)   

I receive the following error:

Exectuion error (NoClassDefFoundError) at org.apache.spark.sql.catalyst.parser.AbstractSQLParser/parse (ParseDriver.scala:90). Could not initialize class org.apache.spark.sql.catalyst.parser.SqlBaseLexer

anthony-khong commented 3 years ago

Very odd! Are you using the geni uberjar from the repo's releases, the Geni lein template or some other way to run this? My guess is it's the Spark deps. Would you like to share your project.clj or deps.edn?

bhougland18 commented 3 years ago

I used the Lein template and then connected to the remote Nrepl instance via the port.

I also get the same error in chapter 4 for the following example:


(def null-counts
  (-> raw-weather-mar-2012
      (g/agg (->> (g/column-names raw-weather-mar-2012)
                  (map #(vector % (g/null-count %)))
                  (into {})))
      g/first))

Here is my project.clj

https://pastebin.ubuntu.com/p/PgqYhvfGy6/