Github user sanjaydasgupta commented on the issue:
https://github.com/apache/zeppelin/pull/2502
Thanks for the suggestions @felixcheung
I was not able to find more documentation on Jupyter's feature, but tried
it with many different variants. There are some behaviors that had not been
found earlier, so I have added it to the implementation and the documentation.
I also gave the documentation section a more distinctive title.
One of the things I learned about Jupyter's implementation is that it never
intercepts an error case. All command strings are passed through to the
underlying command -- with or without interpolation. Any use of '{' and/or '}'
that does not appear to be part of a well-formed _pattern_ causes Jupyter to
pass on the entire command string unchanged. This happens even when the command
string contains other patterns that are well-formed, and could be interpolated.
So, there is now no need to return a status value to indicate the
success/failure of the interpolation. The string returned by the interpolation
function is generated by emulating Jupyter's behavior in the same situation.
I have also moved the interpolation function into the superclass
[Interpreter.java](https://github.com/sanjaydasgupta/zeppelin/commit/9e75333ff7ef9c27678382c598b524eafc6191f7#diff-f9d22f7302ae356454cdcc637942856fR493)
to enable it to be shared and used by other interpreters too. This follows a
suggestion from @Leemoonsoo earlier in the PR. My implementation of this
feature for the Shell interpreter is also ready, and I will submit a PR once
this one is done.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---