1

I am performing this query from the crate.io admin console, and it fails with the an UnsupportedOperationException error:

Cannot create plan for: io.crate.analyze.QueriedSelectRelation

Here is the query:

SELECT url
FROM (
  SELECT url
  FROM my_table
  LIMIT 100
  OFFSET 0
  ) AS chunk
WHERE chunk.url ~ '.*string.*';

If I remove the final line (i.e. the WHERE statement) it runs. Also this runs just fine:

SELECT url
FROM my_table
WHERE url ~ '.*string.*'
LIMIT 10;
Alex
  • 12,078
  • 6
  • 64
  • 74
  • What is cratio.io? Is that the same as crate.io? – egrunin Jan 12 '17 at 20:41
  • typo - sorry. fixed – Alex Jan 12 '17 at 20:43
  • Hi! is there a reason why you can't move the regex match into the subselect? What should be the result of that query? Unfortunately, our subselects are quite limited yet and you might not be able to do everything: https://crate.io/docs/reference/en/latest/sql/subselects.html – claus Jan 13 '17 at 12:35
  • Yeah in this case I can just move it inside. I really just wanted this form for selecting distinct items in the subselect (not done above). Thanks for the reply – Alex Jan 13 '17 at 17:01

0 Answers0