diff --git a/README.md b/README.md index 7f165b0..a467df7 100644 --- a/README.md +++ b/README.md @@ -338,6 +338,13 @@ Even more queries can be found [here](https://colab.research.google.com/github/R # Latest updates +## Version 2.0.0 +- Aligned on the brand new RumbleDB 2.0 release. +- Improved display of pandas dataframes output with -pdf in Jupyter notebooks. +- if error info is activated in the configuration, then they are now printed in the notebook. +- JSON nulls are now by default conflated with absent upon validating for dataframe output, this can be deactivated in the configuration. +- The materialization error upon df/pdf output is now fixed. + ## Version 2.0.0 alpha 1 - When returning a single-column DataFrame with atomic values, the name is now __value and not value to avoid collisions with user-defined columns. - Improved schema inferrence: DataFrames can be returned in a wider range of cases. diff --git a/pyproject.toml b/pyproject.toml index faa6e4e..be388b4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "jsoniq" -version = "2.0.0a1" +version = "2.0.0" 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 101093e..883039c 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/src/jsoniqmagic/magic.py b/src/jsoniqmagic/magic.py index 6f6d7f8..c607f4c 100644 --- a/src/jsoniqmagic/magic.py +++ b/src/jsoniqmagic/magic.py @@ -70,14 +70,20 @@ def run(self, line, cell=None, timed=False): try: df = response.df(); except Py4JJavaError as e: - print(e.java_exception.getMessage()) + if rumble.getRumbleConf().getShowErrorInfo() : + raise e; + else: + print(e.java_exception.getMessage()) return except Exception as e: - print("Query unsuccessful.") - print("Usual reasons: firewall, misconfigured proxy.") - print("Error message:") - print(e.args[0]) - return + if rumble.getRumbleConf().getShowErrorInfo() : + raise e; + else: + print("Query unsuccessful.") + print("Usual reasons: firewall, misconfigured proxy.") + print("Error message:") + print(e.args[0]) + return except: print("Query unsuccessful.") print("Usual reasons: firewall, misconfigured proxy.") @@ -89,7 +95,10 @@ def run(self, line, cell=None, timed=False): try: pdf = response.pdf() except Py4JJavaError as e: - print(e.java_exception.getMessage()) + if rumble.getRumbleConf().getShowErrorInfo() : + raise e; + else: + print(e.java_exception.getMessage()) return except Exception as e: print("Query unsuccessful.") @@ -102,14 +111,17 @@ def run(self, line, cell=None, timed=False): print("Usual reasons: firewall, misconfigured proxy.") return if pdf is not None: - print(pdf) + return pdf if (args.apply_updates): if ("PUL" in response.availableOutputs()): try: response.applyPUL() except Py4JJavaError as e: - print(e.java_exception.getMessage()) + if rumble.getRumbleConf().getShowErrorInfo() : + raise e; + else: + print(e.java_exception.getMessage()) return except Exception as e: print("Query unsuccessful.") @@ -129,7 +141,10 @@ def run(self, line, cell=None, timed=False): try: capplusone = response.take(rumble.getRumbleConf().getResultSizeCap() + 1) except Py4JJavaError as e: - print(e.java_exception.getMessage()) + if rumble.getRumbleConf().getShowErrorInfo() : + raise e; + else: + print(e.java_exception.getMessage()) return except Exception as e: print("Query unsuccessful.")