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

Is the indexr sql process outputs the wrong type? #30

Open
neverlee opened this issue Oct 29, 2018 · 1 comment
Open

Is the indexr sql process outputs the wrong type? #30

neverlee opened this issue Oct 29, 2018 · 1 comment

Comments

@neverlee
Copy link

neverlee commented Oct 29, 2018

  • drill-1.10.0
  • indexr-0.6.1

when I do some search with drill. try this sql:

select tb2.col11, count(1) from 
(
select FLATTEN(convert_fromJSON('[1,1,3,4,5]')) as col11 from {table_name}
) tb2 group by tb2.col11
  • If {table_name} is "(values(1))", it works.
  • if {table_name} is a parquet table such as dfs./opt/drill/apache-drill-1.10.0/sample-data/region.parquet, it still works.
  • if {table_name} is a indexr table. There is a problem:
java.sql.SQLException: SYSTEM ERROR: UnsupportedOperationException: Map, Array, Union or repeated scalar type should not be used in group by, order by or in a comparison operator. Drill does not support compare between MAP:REPEATED and MAP:REPEATED.

Then I do another test. This one works.

select tb2.col11 from (
select FLATTEN(split(col1, '0')) as col11 from 
    (select `col` as col1 from indexr表 where ... limit 1000 ) as tb1
) tb2 group by tb2.col11

This one (without 'limit') panics the same problem:

select tb2.col11 from (
select FLATTEN(split(col1, '0')) as col11 from 
    (select `col` as col1 from indexr表 where ... ) as tb1
) tb2 group by tb2.col11

This one panics the same problem.

select tb2.col11 from (
select FLATTEN(split(`col`, '0')) as col11 from indexr表  where ... limit 1000 
) tb2 group by tb2.col11

Is this problem comes from indexr-query-opt. The indexr sql process outputs the wrong type.

@flowbehappy
Copy link
Collaborator

Hi. It is because IndexR does not support map data type.

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

2 participants