Github user mgaido91 commented on the issue:

    https://github.com/apache/spark/pull/21045
  
    @DylanGuedes the first suggestion I can give you is: do not use spark-shell 
for testing, but write UT and run them with a debugger. Then, you can 
breakpoint to check the generated code (or you can set the debug log level to 
have it written to stderr or find the way you prefer): looking at the generated 
code it is easy to understand the compile error and therefore fix it.
    
    Apart from that, your `doGenCode` method doesn't make sense: there you are 
trying to put the output you expect to see in the shell I guess, but instead 
you should generate valid Java code which performs the same operations you are 
doing in the `eval` method (or as in this case `nullSafeEval`): please refer to 
other functions for drawing your inspiration and understanding how it works.
    
    Thanks.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to