A quick question. I am trying to do semiJoin(). The code looks like below.
val subquery = builder.
scan("foodmart", "customer").
filter(builder.equals(builder.field("city"), builder.literal("Albany"))).
project(builder.field("customer_id")).
build
val mainquery = builder.
scan("foodmart", "sales_fact_1998").
project(builder.field("unit_sales")).
build
val relnode = builder.push(mainquery).push(subquery).semiJoin(
builder.field("customer_id")
).build
But when executing, it throws an error message saying
`java.lang.RuntimeException: java.sql.SQLException: Error while
preparing statement [null]`, and following another exception that
mentions
Cause: org.codehaus.commons.compiler.CompileException: Line 18, Column
66: No applicable constructor/method found for actual parameters
"java.math.BigDecimal"; candidates are: "public static boolean
org.apache.calcite.runtime.SqlFunctions.isTrue(java.lang.Boolean)"
Although it looks like code generation issue, I suspect it's more
likely my incorrect usage to construct semiJoin function. What is the
correct way to use semiJoin? Is there any example or doc that may
contain related info? I have this question because I can not find such
info after searching on the internet. Most of semiJoin results found
on the internet are internal implementation which looks like not
related to the usage.
Thanks