HUE-9117 [editor] Persist default limit when saving snippets in editor v2

Review Request #14711 — Created Jan. 13, 2020 and submitted

jgauthier, ranade, romain, roohi, weixia, yingc
commit 30b66727df7f99ec62611798506e78825be37806
Author: Johan Ahlen <>
Date:   Mon Jan 13 15:46:07 2020 +0100

    HUE-9117 [editor] Persist default limit when saving snippets in editor v2

:100644 100644 cf8497c28c 99ab099692 M	desktop/core/src/desktop/js/apps/notebook2/components/ko.executableActions.js
:100644 100644 8ce852bd49 d80f9edd47 M	desktop/core/src/desktop/js/apps/notebook2/components/ko.executableActions.test.js
:100644 100644 f87640948a 897067e40e M	desktop/core/src/desktop/js/apps/notebook2/execution/executor.js
:100644 100644 83319bb466 3ccdaeb387 M	desktop/core/src/desktop/js/apps/notebook2/execution/sqlExecutable.js
:100644 100644 1a603cc2ae 129d7e1894 M	desktop/core/src/desktop/js/apps/notebook2/execution/sqlExecutable.test.js
:100644 100644 5c8684b3b0 8cd6475e16 M	desktop/core/src/desktop/js/apps/notebook2/snippet.js

commit 1544455e5eef2e988272235bf0a5d3f591b209dd
Author: Johan Ahlen <>
Date:   Mon Jan 13 13:50:12 2020 +0100

    HUE-9117 [editor] Add config option to set default limit for SELECT statements

:100644 100644 974343af10 4dfd3e3709 M	desktop/conf.dist/hue.ini
:100644 100644 7a175dc753 aa873efa89 M	desktop/conf/pseudo-distributed.ini.tmpl
:100644 100644 c19e4b83e1 0faa7ddbce M	desktop/core/src/desktop/
:100644 100644 58ae57dbdc bab6220c73 M	desktop/libs/notebook/src/notebook/

commit 9b922f9441be1f0a986b80f2791012276b040304
Author: Johan Ahlen <>
Date:   Mon Jan 13 15:26:32 2020 +0100

    HUE-9117 [editor] Add default limit input next to execute in editor v2

:100644 100644 536a1e0017 cf8497c28c M	desktop/core/src/desktop/js/apps/notebook2/components/ko.executableActions.js
:100644 100644 b6d410edd9 8ce852bd49 M	desktop/core/src/desktop/js/apps/notebook2/components/ko.executableActions.test.js
:100644 100644 a0b49c7f82 f87640948a M	desktop/core/src/desktop/js/apps/notebook2/execution/executor.js
:100644 100644 8ae613e9ab 83319bb466 M	desktop/core/src/desktop/js/apps/notebook2/execution/sqlExecutable.js
:100644 100644 43480be733 1a603cc2ae M	desktop/core/src/desktop/js/apps/notebook2/execution/sqlExecutable.test.js
:100644 100644 9a106d3044 5c8684b3b0 M	desktop/core/src/desktop/js/apps/notebook2/snippet.js
:100644 100644 71c06763dc dc299c0235 M	desktop/core/src/desktop/static/desktop/css/hue.css
:100644 100644 875c5288cb 5a82b951d3 M	desktop/core/src/desktop/static/desktop/css/hue3-extra.css
:100644 100644 c305f711e3 4c3417ab13 M	desktop/core/src/desktop/static/desktop/less/components/hue-snippet-execute-actions.less
Manual on Chrome
  • 0
  • 0
  • 3
  • 2
  • 5
Description From Last Updated
  1. Nice one!!

    +1 for SELECT only (not inserts etc)
    Do we disable it when the user put 0 in the limit input?
    +1 for moving the flag at the notebook level (I can do it if you prefer?)

    It might trick people doing downloads but we can play more with the UX and have people test the v1.

    1. Si, 0 or empty disables.

  2. How about moving it at the Editor level?

    (simpler to configure in general that way, also conectors are agnostic, so not containing SQL properties, i.e. we would move custom props to instead. Also simpler with multi connectors or multi queries)

    Also upping 100 --> 5000 would be more practical

    1. Done. default_limit is None by default, not sure we want to enforce one?

  3. If we can't parse, should we auto disable the box to show that the limit won't be applied?

    1. Can see for adding this to the background parsing later, it currently checks when executing.

  1. Nice!

    We can blitz and then set a default when stable.

  2. desktop/conf.dist/hue.ini (Diff revision 2)

    nit: not in sync with above

  3. Nit: triple sharp and show an example
    ### Default limit to use in SELECT statements if not present (optional), e.g. 5000.
  1. Actually, as only Notebook 2, +1 to just set a default of 5000?

Review request changed

Status: Closed (submitted)