Reputation: 628
I went through the documentation of Apache Calcite. Is the relNode
correct for the following query in BigQuery?
SELECT CONCAT('a or b',' ', '\n', first_name)
FROM foo.schema.employee
WHERE first_name = 'name';
relNode = builder
.scan("schema.employee")
.filter(builder.call(SqlStdOperatorTable.EQUALS,
builder.field("first_name"),
builder.literal("name"))
.project(builder.call(SqlStdOperatorTable.CONCAT,
builder.literal("a or b"),
builder.literal(" "),
builder.literal("\\n"),
builder.field(first_name)))
.build()
Upvotes: 0
Views: 238
Reputation: 28752
That looks correct at a glance. I would suggest you confirm by looking at the query results and also by converting your RelNode
to SQL.
Upvotes: 1