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

JSONiq: Arrow doesn't work with inline functions #1021

Closed jsommr closed 2 years ago

jsommr commented 3 years ago

This doesn't work: "test" => function ($str) { "ok" }

Workaround:

declare function f($arrow-val, $fn)
{
  $fn($arrow-val)
};

"test" => f(function($str) { "ok" })
ghislainfourny commented 3 years ago

Thanks a lot, indeed I think it is only implemented for static calls for now. We will look into it.

ghislainfourny commented 2 years ago

Happy to announce that this is now supported in the master, and it will be part of the next release!

ghislainfourny commented 2 years ago

As a comment regarding the query in the original comment: please note that the syntax is like this:

"test" => (function ($str) { "ok" })()

i.e., the dynamic function must actually be called.