Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversion failed when the table join contains the in operator #423

Open
maidangdang44 opened this issue Jun 13, 2023 · 0 comments
Open

Comments

@maidangdang44
Copy link
Contributor

maidangdang44 commented Jun 13, 2023

version: 167

I created two Hive table as follow

create table test_db.coral_test1
(
    `id` int,
    `name` string
) 

create table test_db.coral_test2
(
    `id` int,
    `location` string
) 

error sql:

select * from test_db.coral_test1 a join test_db.coral_test2 b on a.id = b.id and b.location in ('xxxx');

error info:

Exception in thread "main" java.lang.RuntimeException: While invoking method 'public org.apache.calcite.rel.rel2sql.SqlImplementor$Result com.linkedin.coral.trino.rel2trino.RelToTrinoConverter.visit(org.apache.calcite.rel.core.Project)'
	at org.apache.calcite.util.ReflectUtil$2.invoke(ReflectUtil.java:527)
	at org.apache.calcite.rel.rel2sql.RelToSqlConverter.dispatch(RelToSqlConverter.java:122)
	at org.apache.calcite.rel.rel2sql.RelToSqlConverter.visitChild(RelToSqlConverter.java:128)
	at com.linkedin.coral.trino.rel2trino.RelToTrinoConverter.convertToSqlNode(RelToTrinoConverter.java:95)
	at com.linkedin.coral.trino.rel2trino.RelToTrinoConverter.convert(RelToTrinoConverter.java:83)
	at com.linkedin.coral.MyConvertTest.main(MyConvertTest.java:67)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.calcite.util.ReflectUtil$2.invoke(ReflectUtil.java:524)
	... 5 more
Caused by: java.lang.RuntimeException: While invoking method 'public org.apache.calcite.rel.rel2sql.SqlImplementor$Result org.apache.calcite.rel.rel2sql.RelToSqlConverter.visit(org.apache.calcite.rel.core.Join)'
	at org.apache.calcite.util.ReflectUtil$2.invoke(ReflectUtil.java:527)
	at org.apache.calcite.rel.rel2sql.RelToSqlConverter.dispatch(RelToSqlConverter.java:122)
	at org.apache.calcite.rel.rel2sql.RelToSqlConverter.visitChild(RelToSqlConverter.java:128)
	at com.linkedin.coral.trino.rel2trino.RelToTrinoConverter.visit(RelToTrinoConverter.java:122)
	... 10 more
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.calcite.util.ReflectUtil$2.invoke(ReflectUtil.java:524)
	... 13 more
Caused by: java.lang.AssertionError: IN($1, 'xxxx')
	at org.apache.calcite.rel.rel2sql.SqlImplementor.convertConditionToSqlNode(SqlImplementor.java:285)
	at org.apache.calcite.rel.rel2sql.SqlImplementor.convertConditionToSqlNode(SqlImplementor.java:222)
	at org.apache.calcite.rel.rel2sql.RelToSqlConverter.visit(RelToSqlConverter.java:152)
	... 18 more
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant