kmularise commented on code in PR #4987:
URL: https://github.com/apache/zeppelin/pull/4987#discussion_r2233843118


##########
mongodb/src/main/resources/shell_extension.js:
##########
@@ -104,6 +104,26 @@ function printTable(dbquery, fields, flattenArray) {
     printTable(this, fields, flattenArray);
 };
 
+function ensureTableFunction() {
+    var tableFunc = function(fields, flattenArray) {
+        printTable(this, fields, flattenArray);
+        return this;
+    };
+
+    try {
+        var sampleCursor = db.getCollection('__dummy__').find({}).limit(0);
+        var proto = Object.getPrototypeOf(sampleCursor);
+
+        if (proto && !proto.table) {
+            proto.table = tableFunc;

Review Comment:
   Thanks for the review! I missed applying the `tableLimit` check in the 
`tableFunc`. I'll update the code to include the tableLimit check.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscr...@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to