[
https://issues.apache.org/jira/browse/DRILL-24?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13575091#comment-13575091
]
Timothy Chen commented on DRILL-24:
-----------------------------------
So I'm trying my first impl of Left join, but tried a several times to define a
logical plan that should work, but keep getting this error:
Caused by: com.fasterxml.jackson.databind.exc.InvalidFormatException: Can not
construct instance of java.lang.Integer from String value '}': not a valid
Integer value
at [Source: java.io.StringReader@4d8088da; line: 42, column: 5]
with plan:
{
head:{
type:"apache_drill_logical_plan",
version:"1",
generator:{
type:"manual",
info:"na"
}
},
sources:[
{
type:"json",
name:"donuts-json",
files:[
"src/test/resources/donuts.json"
]
}
],
query:[
{
op: "scan",
memo: "initial_scan",
ref: "donuts",
source: "donuts-json",
selection: {data: "activity"}
},
{
op: "scan",
memo: "second_scan",
ref: "donuts_2",
source: "donuts-json",
selection: {data: "activity"}
},
{
op: "join",
left: "donuts",
right: "donuts_2",
type: "left",
conditions: [
{relationship: "equals", left: "sales", right: "sales"}
]
},
{
op: "write",
memo: "output sink",
file: "console:///stdout"
}
]
}
Not sure if I'm doing anything wrong with the logical plan?
> Implement Join Reference Operator
> ---------------------------------
>
> Key: DRILL-24
> URL: https://issues.apache.org/jira/browse/DRILL-24
> Project: Apache Drill
> Issue Type: New Feature
> Reporter: Timothy Chen
> Assignee: Timothy Chen
> Labels: logical
>
> Join (M)
> Joins two inputs based on one or more join conditions. The output of this
> operator is the combination of the two inputs. This is done by providing a
> combination record of each set of input records that matches all provided
> join conditions. In the case that no conditions are provided, a cartesian
> join is generated. The combination record is a single record that contains a
> merged map of values from both provided input records. For example, if the
> left record is {donuts: [data]} and the right is {purchases: [data]}, the
> combination record would be {donuts: [data], purchases: [data]}. Join also
> requires a condition type variable which. This describes what happens when a
> record doesn’t match the join conditions. Inner means only records that
> match the join conditions should be included. Outer means if a record is
> Avaiable relationship types ‘Reltypes’ include: >, >=, <=, <, !=, ==
> { @id†: <opref>, op: “join”,
> left: <input>,
> right: <input>,
> type: <inner|outer|right|left>,
> conditions*: [
> {relationship: <reltype>, left: <expr>, right: <expr>}, ...
> ]
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira