Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/jsoniqmagic/magic.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ def _execute(self, rumble, language, data, args, start):
if (args.json or (not args.pandas_data_frame and not args.pyspark_data_frame)):
capplusone = response.take(rumble.getRumbleConf().getInt("runtime.resultsSizeCap") + 1)
if len(capplusone) > rumble.getRumbleConf().getInt("runtime.resultsSizeCap"):
count = response.count()
print("The query output %s items, which is too many to display. Displaying the first %s items:" % (count, rumble.getRumbleConf().getInt("runtime.resultsSizeCap")))
print("The query output too many items to display. Displaying the first %s items:" % (rumble.getRumbleConf().getInt("runtime.resultsSizeCap")))
for e in capplusone[:rumble.getRumbleConf().getInt("runtime.resultsSizeCap")]:
print(json.dumps(json.loads(e.serializeAsJSON()), indent=2))

Expand Down
2 changes: 1 addition & 1 deletion tests/test_notebook_errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def test_non_java_errors_are_unchanged():
@pytest.mark.parametrize("stage,option", [
("query", "-j"), ("serialize", "-s"), ("df", "-df"),
("show", "-df"), ("pdf", "-pdf"), ("availableOutputs", "-u"),
("applyPUL", "-u"), ("take", "-j"), ("count", "-j"),
("applyPUL", "-u"), ("take", "-j"),
("serializeAsJSON", "-j"),
])
def test_magic_uses_shared_error_policy(language, debug, stage, option):
Expand Down
Loading