[ 
https://issues.apache.org/jira/browse/TOREE-257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15140919#comment-15140919
 ] 

Gino Bustelo commented on TOREE-257:
------------------------------------

@Jakub From the user's perspective, you are right, you should not have to 
reformat your code. There is a bug in Toree. Now, we do have to process line by 
line because there is the concept of `line magics`. A line magic is something 
that could be embedded in the middle of your scala code, but it is not 
understood by the Scala Interpreter. That is one of the reasons we process line 
by line.

> Code submit does not support paste mode
> ---------------------------------------
>
>                 Key: TOREE-257
>                 URL: https://issues.apache.org/jira/browse/TOREE-257
>             Project: TOREE
>          Issue Type: Bug
>            Reporter: Jakub Dubovsky
>            Priority: Minor
>
> <cell>
> val bbb = aaa.filter( ! _._4.isEmpty)
>   .map(row => ((row._2, row._4), row))
> </cell>
> Submit of this cell results in error:
> Name: Compile Error
> Message: <console>:1: error: illegal start of definition
>          .map(row => ((row._2, row._4), row))
>          ^
> This is probably because the content of cell is "retyped" into scala/spark 
> shell line by line. First line is recognized and compiled as statement whose 
> continuation on second line is ignored.
> In scala repl this is solved by using :paste mode which does not work here.
> This looks like minor bug but is very annoying actually. It prevents me from 
> concatenating more filter/map/... statements which is what 90% of 
> experimental spark code written in jupyter looks like.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to