diff --git a/src/jsoniqmagic/magic.py b/src/jsoniqmagic/magic.py index 46cd75e..777c444 100644 --- a/src/jsoniqmagic/magic.py +++ b/src/jsoniqmagic/magic.py @@ -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)) diff --git a/tests/test_notebook_errors.py b/tests/test_notebook_errors.py index 049fb77..e28402b 100644 --- a/tests/test_notebook_errors.py +++ b/tests/test_notebook_errors.py @@ -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):