diff --git a/README.md b/README.md index 0ca1ae3..ce05a42 100644 --- a/README.md +++ b/README.md @@ -338,6 +338,9 @@ Even more queries can be found [here](https://colab.research.google.com/github/R # Latest updates +## Version 2.0.3 +- Some unquoted strings (like document, binary, pi, etc) were not properly recognized and could not be used as variable names or for unquoted object lookup. This is now fixed. + ## Version 2.0.2 - Add MongoDB connection (mongodb-collection()). Requires including .withMongo() when creating the RumbleSession. diff --git a/pyproject.toml b/pyproject.toml index 640d497..8c02cfe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "jsoniq" -version = "2.0.2" +version = "2.0.3" description = "Python edition of RumbleDB, a JSONiq engine" requires-python = ">=3.11" dependencies = [ diff --git a/src/jsoniq/jars/rumbledb-2.0.0.jar b/src/jsoniq/jars/rumbledb-2.0.0.jar index b386861..70bd699 100644 Binary files a/src/jsoniq/jars/rumbledb-2.0.0.jar and b/src/jsoniq/jars/rumbledb-2.0.0.jar differ diff --git a/tests/test_bugfix_keywords.py b/tests/test_bugfix_keywords.py new file mode 100644 index 0000000..33e1194 --- /dev/null +++ b/tests/test_bugfix_keywords.py @@ -0,0 +1,19 @@ +from jsoniq import RumbleSession +from unittest import TestCase +import json +class TryTesting(TestCase): + def test1(self): + # The syntax to start a session is similar to that of Spark. + # A RumbleSession is a SparkSession that additionally knows about RumbleDB. + # All attributes and methods of SparkSession are also available on RumbleSession. + rumble = RumbleSession.builder.appName("PyRumbleExample").getOrCreate(); + # A more complex, standalone query + + seq = rumble.jsoniq(""" + let $node := { "binary" : "af12" } + return $node.binary + """); + + expected = ('af12',) + + self.assertTrue(json.dumps(seq.json()) == json.dumps(expected))