RumbleDB / rumble

⛈️ RumbleDB 1.21.0 "Hawthorn blossom" 🌳 for Apache Spark | Run queries on your large-scale, messy JSON-like data (JSON, text, CSV, Parquet, ROOT, AVRO, SVM...) | No install required (just a jar to download) | Declarative Machine Learning and more
http://rumbledb.org/
Other
211 stars 82 forks source link

Null pointer exception when an ordering criterion is always the empty sequence #906

Closed mmilanta closed 2 years ago

mmilanta commented 3 years ago

It might be an invalid query, I am not very confident with Jsoniq

for $i in json-file("confusion-2014-03-02.json")
       where $i.target eq $i.guess
       order by $i.lenguage ascending, $i.country ascending, $i.date ascending
       count $c
       where $c <= 5
return $i

The error was:

[ERROR] An error has occurred: null
We should investigate this 🙈. Please contact us or file an issue on GitHub with your query. 
Link: https://github.com/RumbleDB/rumble/issues
ghislainfourny commented 3 years ago

Thank you for your bug report! Indeed that's a bug, and a fix is under way.

However, it can help you to know that your query has a typo: lenguage instead of language. It resulted in the empty sequence (which is where the bug was).

If you use language, it should work again even with Rumble 1.10.0.

I hope it helps!

ghislainfourny commented 3 years ago

This is now fixed in the master and will make it into the next release.

If you feel adventurous, you can try to compile the master and confirm that it works for you (the first ordering criterion will just be ignored as it is constantly the empty sequence because of the typo, but no error should be returned any more).

ghislainfourny commented 3 years ago

Another remark: A master student is currently implementing the static typing feature for Rumble. With this new feature in place, Rumble will, at some point, detect such cases and return an error warning you about your typo.

mmilanta commented 3 years ago

Thanks for the feedback, I'll definitely try to compile the master; however, for now, I have incountered some issues with maven. Many Thanks Marco

On Tue, Jan 19, 2021 at 3:58 PM Ghislain Fourny notifications@github.com wrote:

This is now fixed in the master and will make it into the next release.

If you feel adventurous, you can try to compile the master and confirm that it works for you (the first ordering criterion will just be ignored as it is constantly the empty sequence because of the typo, but no error should be returned any more).

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/RumbleDB/rumble/issues/906#issuecomment-762895913, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARIV4IB67ZRHPB5HOERBCITS2WM2NANCNFSM4WHFUA5Q .

ghislainfourny commented 3 years ago

Thanks! Rumble is usually released every two months, so it will make it to the next release (1.11.0). We are currently pushing 1.10.0 into Maven in case you need the latest official release.

ghislainfourny commented 2 years ago

@mmilanta the fix is available in the current releases. Do you agree if we close this issue?