You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (JIRA)" <ji...@apache.org> on 2019/05/21 04:25:12 UTC
[jira] [Updated] (SPARK-13432) Add the origin of the source code
into a generated Java code
[ https://issues.apache.org/jira/browse/SPARK-13432?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hyukjin Kwon updated SPARK-13432:
---------------------------------
Labels: bulk-closed (was: )
> Add the origin of the source code into a generated Java code
> ------------------------------------------------------------
>
> Key: SPARK-13432
> URL: https://issues.apache.org/jira/browse/SPARK-13432
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Reporter: Kazuaki Ishizaki
> Priority: Minor
> Labels: bulk-closed
>
> Based on a discussion with [~sarutak], it would be good to add the function and line of the original Spark program into a generated Java file by Catalyst. This feature helps identify an reported issue in a generated code quickly.
> Here is an example.
> Original Spark program.
> {code:java}
> object Test {
> ...
> df.filter("v <= 3")
> .filter("v % 2 == 0")
> .show()
> ...
> }
> {code}
> Generated Java code
> {code:java}
> /* 031 */ protected void processNext() throws java.io.IOException {
> /* 032 */ while (input.hasNext()) {
> /* 033 */ InternalRow inputadapter_row = (InternalRow) input.next();
> /* 034 */ /* input[0, string] @ filter at Test.scala:23 */
> /* 035 */ boolean inputadapter_isNull = inputadapter_row.isNullAt(0);
> /* 036 */ UTF8String inputadapter_value = inputadapter_isNull ? null : (inputadapter_row.getUTF8String(0));
> /* 037 */ /* input[1, int] @ filter at Test.scala:23 */
> /* 038 */ boolean inputadapter_isNull1 = inputadapter_row.isNullAt(1);
> /* 039 */ int inputadapter_value1 = inputadapter_isNull1 ? -1 : (inputadapter_row.getInt(1));
> /* 040 */ /* ((input[1, int] <= 3) && ((input[1, int] % 2) = 0)) @ filter at Test.scala:23 */
> /* 041 */ /* (input[1, int] <= 3) @ filter at Dataset1.scala:22 */
> ...
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org