Github user Leemoonsoo commented on the issue:

    https://github.com/apache/zeppelin/pull/1658
  
    I think this PR is ready to be reviewed.
    While this PR includes quite a lot of changes i'm highlighting some key 
changes.
    
    1. Display multiple types of output in a single paragraph.
    
       Previously, if output includes multiple display system directive (e.g. 
%html, %text, etc) only the last one was effective and all the previous output 
was ignored. After the change, a paragraph sequentially display all display 
system directive in the output result.
    
       To do that, on the front-end side,
       Created ResultCtrl controller under 
`zeppelin-web/src/app/notebook/paragraph/result`
       and moved paragraph result rendering related scripts/templates under 
this directory.
    
        /notebook/paragraph/paragraph-graph.html -> 
/notebook/paragraph/result/result-graph.html
        /notebook/paragraph/paragraph-pivot.html -> 
/notebook/paragraph/result/result-pivot.html
        /notebook/paragraph/paragraph-result.html -> 
/notebook/paragraph/result/result-results.html
        /notebook/paragraph/paragraph-chart-selector.html -> 
/notebook/paragraph/result/result-chart-selector.html
    
        on the back-end side,
        Created 
`zeppelin-interpreter/interpreter/InterpreterResultMessageOutput.java` to take 
care of single output stream and existing 
`zeppelin-interpreter/interpreter/InterpreterResultMessageOutput.java` changed 
to take care of multiple outputs through `InterpreterResultMessageOutput`
    
    2. Compatibility between old, new notebook format.
    
       note.json format is changed to store multiple outputs in the paragraph.
    
       To read note.json created by previous versions of Zeppelin, 
[Notebook.convertFromSingleResultToMultipleResultsFormat()](https://github.com/apache/zeppelin/blob/7ab6679a87ed75f176ffa61d8cf6c73f4241c528/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Notebook.java#L385)
 will automatically convert format when note.json is loaded in Zeppelin.
    
       If old version of Zeppelin reads notebook created by newer version, 
everything will be load normally except for output. Output will be empty.
    
       In detail, note.json is changed from
    
       ```
       paragraph : [
          {
              result : {
                  code: "",
                  type: "",
                  msg: ""            
              },
              config : {
                 graph : {},
                 ...
              },
              ...
          },
          ...
       ],
       ...
       ```
    
       to
    
       ```
       paragraph : [
          {
              results : {
                 {
                    code: "",
                    msg: [
                       {
                            type: "",
                            data: ""
                        },
                        {
                            type: "",
                            data: ""
                         },
                         ...
                    ]
              },
              config : {
                 results : [
                    {
                        graph : {},
                    },
                    {
                        graph : {},
                    },
                    ...
                 ]
              },
              ...
          },
          ...
       ],
       ...
       ```
    
    3. Every other changes are trivial
    
       Most changes are trivial change due to change of InterpreterOutput and 
InterpreterResult api changes.


---
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