Github user sanjaydasgupta commented on the issue:

    https://github.com/apache/zeppelin/pull/2502
  
    I had not thought about that @Leemoonsoo, thanks for alerting me to it.
    
    As the code now stands (in relation to 
[Interpreter.java](https://github.com/apache/zeppelin/blob/master/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/Interpreter.java)
 and it's concrete child classes) object interpolation is not automatically 
applied to the command string when 
[interpret(...)](https://github.com/apache/zeppelin/blob/master/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/Interpreter.java#L86)
 is called. So, it is as if the feature is off by default, and each interpreter 
can opt in by adding a few lines of code to its overridden version of 
`interpret(...)` for calling the command interpolating function 
[SparkSqlInterpreter.interpolateVariable(...)](https://github.com/sanjaydasgupta/zeppelin/blob/906b698187bf5d4f358cb1263bdb15bfb0b286f4/spark/src/main/java/org/apache/zeppelin/spark/SparkSqlInterpreter.java#L92).
 
    
    In the long run (when more interpreters use this feature), the 
interpolating function 
[SparkSqlInterpreter.interpolateVariable(...)](https://github.com/sanjaydasgupta/zeppelin/blob/906b698187bf5d4f358cb1263bdb15bfb0b286f4/spark/src/main/java/org/apache/zeppelin/spark/SparkSqlInterpreter.java#L92)
 could be moved up into `Interpreter.java`, and the command interpolation logic 
could be applied automatically -- conditionally upon the return value of a 
function like [Interpreter. 
getFormType()](https://github.com/apache/zeppelin/blob/master/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/Interpreter.java#L102).
    
    My feeling is that fairly extensive refactoring affecting all the existing 
interpreter classes will be needed when the changes in the previous paragraph 
are made. But I can take that path if you think it is preferable.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to