Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug where g/->dataset doesn't work for more than 8 columns #340

Merged

Conversation

WaqasAliAbbasi
Copy link
Contributor

  • I have read through the quick start and installation sections of the README.

Info

Info Value
Geni Version 0.0.39

Problem / Steps to reproduce

Many apologies, I introduced a bug in #336 where g/->dataset loses order of the values when there are more than 8 columns:

(-> (g/records->dataset
     @tr/spark
     [{:a 1  :b 2  :c 3  :d 4  :e 5  :f 6  :g 7  :h 8  :i 9}
      {:a 10 :b 11 :c 12 :d 13 :e 14 :f 15 :g 16 :h 17 :i 18}])
    g/collect)

leads to

;({:e 9, :g 3, :c 1, :h 5, :b 2, :d 6, :f 4, :i 7, :a 8}
; {:e 18, :g 12, :c 10, :h 14, :b 11, :d 15, :f 13, :i 16, :a 17})

Expected Result

g/collect should return the same output as the one we provided to g/->dataset

Proposed Solution

Dont use zipmap in

table (transpose (map (partial apply fill-missing-nested-keys) (zipmap transposed values)))

Background

@anthony-khong anthony-khong merged commit f0bb380 into zero-one-group:develop Jan 12, 2022
@anthony-khong
Copy link
Member

I'll make a new release by this week!

@WaqasAliAbbasi
Copy link
Contributor Author

I'll make a new release by this week!

Thanks 🥳

@WaqasAliAbbasi
Copy link
Contributor Author

I'll make a new release by this week!

Hi Anthony, any ETA on this?

@anthony-khong
Copy link
Member

Hi @WaqasAliAbbasi, 0.0.40 should be up on Clojars: https://clojars.org/zero.one/geni. Would that be sufficient for you?

The actual GitHub release and merging the changes upstream will come later!

@WaqasAliAbbasi
Copy link
Contributor Author

Hi @WaqasAliAbbasi, 0.0.40 should be up on Clojars: https://clojars.org/zero.one/geni. Would that be sufficient for you?

The actual GitHub release and merging the changes upstream will come later!

Yep that's perfect, thank you so much! 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants