table not found with apache calcite

后端 未结 1 2046
隐瞒了意图╮
隐瞒了意图╮ 2020-12-18 14:53

I am trying to do some basic things with calcite to understand the framework. I have setup a simple example that is supposed to read from 2 json files. My model looks like <

相关标签:
1条回答
  • 2020-12-18 15:23

    The problem is case-sensitivity. Because you did not enclose the table name in double-quotes, Calcite's SQL parser converted it to upper case. Because the file is called 'a.json', the table is also called 'a', whereas your query is looking for a table called 'A'.

    The solution is to write your query as follows:

    select _MAP['name'] from "a"
    

    This becomes:

    stat.execute("select _MAP['name'] from \"a\"");
    

    when you embed it in Java.

    0 讨论(0)
提交回复
热议问题