Yash Sharma created DRILL-1531:
----------------------------------
Summary: LogicalPlanBuilder only allows one scan operator in Query
Key: DRILL-1531
URL: https://issues.apache.org/jira/browse/DRILL-1531
Project: Apache Drill
Issue Type: Bug
Reporter: Yash Sharma
Currently the LogicalPlanBuilder is only allowing one scan operator. If there
are two scan operators reading from two files it keeps the last one.
For scenarios like this-
{code}
{
"op" : "scan",
"@id" : 1,
"storageengine" : "cp",
"selection" : {
"format" : {
"type" : "named",
"name" : "parquet"
},
"files" : [ "/tpch/customer.parquet" ]
}
}, {
"op" : "scan",
"@id" : 3,
"storageengine" : "cp",
"selection" : {
"format" : {
"type" : "named",
"name" : "parquet"
},
"files" : [ "/tpch/nation.parquet" ]
}
}, {
"op" : "project",
"@id" : 4,
"input" : 3,
"projections" : [ {
"ref" : "`n_nationkey`",
"expr" : "`n_nationkey`"
}, {
"ref" : "`n_name`",
"expr" : "`n_name`"
}, {
"ref" : "`n_comment`",
"expr" : "`n_comment`"
} ]
}
{code}
It would generate a plan with last scan operator-
{code}
{
"head" : {
"version" : 1,
"generator" : {
"type" :
"org.apache.drill.exec.pigparser.parser.PigPlanConverter$PigToDrillPlanConverter",
"info" : "drill-pig-parser"
},
"type" : "APACHE_DRILL_LOGICAL",
"options" : null,
"queue" : 0,
"resultMode" : "EXEC"
},
"storage" : {
"cp" : {
"type" : "file",
"enabled" : true,
"connection" : "file:///",
"workspaces" : null,
"formats" : {
"tsv" : {
"type" : "text",
"extensions" : [ "tsv" ],
"delimiter" : "\t"
},
"csv" : {
"type" : "text",
"extensions" : [ "csv" ],
"delimiter" : ","
}
}
}
},
"query" : [ {
"op" : "scan",
"@id" : 1,
"storageengine" : "cp",
"selection" : {
"format" : {
"type" : "named",
"name" : "tsv"
},
"files" : [
"file:/home/yash/work/git/drill-win-forked/incubator-drill/exec/java-exec/src/test/resources/store/text/data/nations.tsv"
]
}
}, {
"op" : "store",
"@id" : 2,
"input" : 1,
"target" : null,
"storageEngine" : "--SCREEN--"
} ]
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)