Skip to content

Commit aeb6223

Browse files
Official 2.0 release.
Official 2.0 release.
2 parents d94b4b7 + ad6560d commit aeb6223

4 files changed

Lines changed: 33 additions & 11 deletions

File tree

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,13 @@ Even more queries can be found [here](https://colab.research.google.com/github/R
338338

339339
# Latest updates
340340

341+
## Version 2.0.0
342+
- Aligned on the brand new RumbleDB 2.0 release.
343+
- Improved display of pandas dataframes output with -pdf in Jupyter notebooks.
344+
- if error info is activated in the configuration, then they are now printed in the notebook.
345+
- JSON nulls are now by default conflated with absent upon validating for dataframe output, this can be deactivated in the configuration.
346+
- The materialization error upon df/pdf output is now fixed.
347+
341348
## Version 2.0.0 alpha 1
342349
- When returning a single-column DataFrame with atomic values, the name is now __value and not value to avoid collisions with user-defined columns.
343350
- Improved schema inferrence: DataFrames can be returned in a wider range of cases.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "jsoniq"
7-
version = "2.0.0a1"
7+
version = "2.0.0"
88
description = "Python edition of RumbleDB, a JSONiq engine"
99
requires-python = ">=3.11"
1010
dependencies = [

src/jsoniq/jars/rumbledb-2.0.0.jar

1.56 KB
Binary file not shown.

src/jsoniqmagic/magic.py

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,20 @@ def run(self, line, cell=None, timed=False):
7070
try:
7171
df = response.df();
7272
except Py4JJavaError as e:
73-
print(e.java_exception.getMessage())
73+
if rumble.getRumbleConf().getShowErrorInfo() :
74+
raise e;
75+
else:
76+
print(e.java_exception.getMessage())
7477
return
7578
except Exception as e:
76-
print("Query unsuccessful.")
77-
print("Usual reasons: firewall, misconfigured proxy.")
78-
print("Error message:")
79-
print(e.args[0])
80-
return
79+
if rumble.getRumbleConf().getShowErrorInfo() :
80+
raise e;
81+
else:
82+
print("Query unsuccessful.")
83+
print("Usual reasons: firewall, misconfigured proxy.")
84+
print("Error message:")
85+
print(e.args[0])
86+
return
8187
except:
8288
print("Query unsuccessful.")
8389
print("Usual reasons: firewall, misconfigured proxy.")
@@ -89,7 +95,10 @@ def run(self, line, cell=None, timed=False):
8995
try:
9096
pdf = response.pdf()
9197
except Py4JJavaError as e:
92-
print(e.java_exception.getMessage())
98+
if rumble.getRumbleConf().getShowErrorInfo() :
99+
raise e;
100+
else:
101+
print(e.java_exception.getMessage())
93102
return
94103
except Exception as e:
95104
print("Query unsuccessful.")
@@ -102,14 +111,17 @@ def run(self, line, cell=None, timed=False):
102111
print("Usual reasons: firewall, misconfigured proxy.")
103112
return
104113
if pdf is not None:
105-
print(pdf)
114+
return pdf
106115

107116
if (args.apply_updates):
108117
if ("PUL" in response.availableOutputs()):
109118
try:
110119
response.applyPUL()
111120
except Py4JJavaError as e:
112-
print(e.java_exception.getMessage())
121+
if rumble.getRumbleConf().getShowErrorInfo() :
122+
raise e;
123+
else:
124+
print(e.java_exception.getMessage())
113125
return
114126
except Exception as e:
115127
print("Query unsuccessful.")
@@ -129,7 +141,10 @@ def run(self, line, cell=None, timed=False):
129141
try:
130142
capplusone = response.take(rumble.getRumbleConf().getResultSizeCap() + 1)
131143
except Py4JJavaError as e:
132-
print(e.java_exception.getMessage())
144+
if rumble.getRumbleConf().getShowErrorInfo() :
145+
raise e;
146+
else:
147+
print(e.java_exception.getMessage())
133148
return
134149
except Exception as e:
135150
print("Query unsuccessful.")

0 commit comments

Comments
 (0)