-
Notifications
You must be signed in to change notification settings - Fork 2
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
Array Swap using Ordinals - bug in computing offset? #7
Comments
Hey, my pleasure. I didn't even know anyone was actually using them. I was working on reimplementing them in WebAssembly so you'd only have to install a single super lightweight plugin and you could safely download and execute the function code based on the function url. That might be the case. I'll have to check. If I did that it was probably based on my thinking some array was one based and now zero based. I seem to remember I forced the user to be explicit about what type of indexing they were using and I might have made the internal implementation one based. |
Definitely appreciate the complement of functionality to the minimal set Stardog offers currently. :-) RE: Swap: here's what I'm having to do to Swap positions 2 & 3 (1-based), unless I'm using it incorrectly - note that I need to specify
|
Give me just a little bit to take a look and fix that up. I probably made a fencepost error in the internal implementation trying to keep users from making fencepost errors. Doh! I think I picked up that usage from Google's BigTable functions where they use that. Let me know if you find it annoying or helpful. There's also an array:toString function that prints arrays out a little more compactly. I found it useful when testing stuff out rather than having to unnest. |
ha! no prob, and absolutely no hurry. RE: array:toString, for me that emits datatypes too which makes it a lot less intelligible for testing. So, usually I've been opting for string:join(With) and sometimes unnest as above (which I'm sure makes zero deterministic guarantees about order, but it was good enough here...) |
I wanted to let you know that I have a new Stardog function library that brings a bunch of really cool features and I'd really appreciate the feedback. This new library should replace everything that I've done before. It allows me to publish functions individually and on demand via WebAssembly rather than having to download and install a new jar. You can cache functions for offline use and they're not necessarily dependent on a domain name to reference them. It's in the stardog-webfunction-plugin repo. I'm planning to add plugins for Jena, rdf4j and even other platforms like Kafka ksq, Flink, Spark, etc. |
stardog-extensions/src/main/java/com/semantalytics/stardog/kibble/array/Swap.java
Line 41 in 1565276
Shouldn't the offset here be -1 and not -2? (and P.S. thanks for all these awesome stardog extension functions!)
The text was updated successfully, but these errors were encountered: