Skip to content

Commit 321c9fd

Browse files
Decouple materialization cap parameter from result size parameter.
Decouple materialization cap parameter from result size parameter.
2 parents e57b336 + 4e2dadf commit 321c9fd

7 files changed

Lines changed: 15 additions & 1 deletion

File tree

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.jar filter=lfs diff=lfs merge=lfs -text

.github/workflows/python-app.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919

2020
steps:
2121
- uses: actions/checkout@v4
22+
with:
23+
lfs: true
2224
- name: Set up Python 3.11
2325
uses: actions/setup-python@v3
2426
with:

README.md

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

339339
# Latest updates
340340

341+
## Version 2.0.6
342+
- Decoupled the internal materialization cap (when a parallel sequence of items is materialized, e.g., into an array) from the outer result size cap (for printing to screen) with now two distinct configuration parameters. The default materialization cap is set to 100'000 items while the default outer result size is set to 10. They can be changed by the user through the Rumble configuration.
343+
- Fixed an issue in the implementation when a FLWOR gets executed locally with a return clause with an underlying RDD or DataFrame.
344+
341345
## Version 2.0.5
342346
- Support for @ (primary keys) within arrays of objects and ? for allowing null in JSound compact schemas. It corresponds to unique, and a union with js:null, in the JSound verbose syntax.
343347

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.5"
7+
version = "2.0.6"
88
description = "Python edition of RumbleDB, a JSONiq engine"
99
requires-python = ">=3.11"
1010
dependencies = [

src/jsoniq/jars/rumbledb-2.0.0.jar

-31.7 MB
Binary file not shown.

src/jsoniq/sequence.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,16 @@ def rdd(self):
5454
return self._rumblesession.lastResult
5555

5656
def df(self):
57+
if (not "DataFrame" in self._jsequence.availableOutputs()):
58+
sys.stderr.write(self.schema_str)
59+
return None
5760
self._rumblesession.lastResult = DataFrame(self._jsequence.getAsDataFrame(), self._sparksession)
5861
return self._rumblesession.lastResult
5962

6063
def pdf(self):
64+
if (not "DataFrame" in self._jsequence.availableOutputs()):
65+
sys.stderr.write(self.schema_str)
66+
return None
6167
self._rumblesession.lastResult = self.df().toPandas()
6268
return self._rumblesession.lastResult
6369

tests/test_sample.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ def test1(self):
1111
# All attributes and methods of SparkSession are also available on RumbleSession.
1212

1313
rumble = RumbleSession.builder.getOrCreate();
14+
rumble.getRumbleConf().setResultSizeCap(100);
1415

1516
# Just to improve readability when invoking Spark methods
1617
# (such as spark.sql() or spark.createDataFrame()).

0 commit comments

Comments
 (0)