[
https://issues.apache.org/jira/browse/PIG-4815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15502764#comment-15502764
]
liyunzhang_intel commented on PIG-4815:
---------------------------------------
[~szita]: can you also file a review board to help review?
following are some comment after review
1. add license description in the head of
org.apache.pig.backend.hadoop.executionengine.spark.plan.XMLSparkPrinter.
2. please modify package import(reference PIG-4604) in SparkLaucher and
XMLSparkPrinter
3. the modification in TestPigServer also relates the code in mr, please invite
[~daijy] or [~rohini] to review.
4. about TestPigServer#verifyExplainXmlComplexSpark
4.1 rename variable "joins" to "groups" because this is a case about group
4.2 can you explain why need to check the size of foreachCount, castCount,
loadCount
{code}
private void verifyExplainXmlComplexSpark(Document doc) {
NodeList stores = doc.getElementsByTagName("POStore");
assertEquals(1, stores.getLength());
NodeList joins = doc.getElementsByTagName("POJoinGroupSpark"); //
rename joins to groups because this is a case about group
assertEquals(2, joins.getLength());
Node innerJoin = joins.item(1);
NodeList joinChildren = innerJoin.getChildNodes();
int foreachCount = 0;
int castCount = 0;
int loadCount = 0;
for (int i = 0; i < joinChildren.getLength(); i++) {
Node node = joinChildren.item(i);
if (node.getNodeName().equals("POForEach")){
++foreachCount;
NodeList foreachNodes = node.getChildNodes();
for (int j = 0; j < foreachNodes.getLength(); j++) {
Node innerNode = foreachNodes.item(j);
if (innerNode.getNodeName().equals("alias")){
assertEquals("b",innerNode.getTextContent());
}else if (innerNode.getNodeName().equals("POCast")){
++castCount;
}else if (innerNode.getNodeName().equals("POLoad")) {
++loadCount;
}
}
}
}
assertEquals(1,foreachCount);
assertEquals(3,castCount);
assertEquals(1,loadCount);
}
{code}
> Add xml format support for 'explain' in spark engine
> -----------------------------------------------------
>
> Key: PIG-4815
> URL: https://issues.apache.org/jira/browse/PIG-4815
> Project: Pig
> Issue Type: Task
> Components: spark
> Reporter: Prateek Vaishnav
> Assignee: Adam Szita
> Fix For: spark-branch
>
> Attachments: PIG-4815.patch
>
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)