[ 
https://issues.apache.org/jira/browse/CALCITE-2426?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16558172#comment-16558172
 ] 

sathishkumar commented on CALCITE-2426:
---------------------------------------

Thanks Andrei. That helps. I requested for a sample join query using calcite in 
mongodb. I am not getting help in any documentation on the syntax of calcite 
queries.

For Eg: 

*select "users"._MAP['_id'] from "users" left outer join "user_preferences" on 
"users"._MAP['_id']="user_preferences"._MAP['_id'];*

*issue:*

Caused by: com.mongodb.MongoCommandException: Command failed with error 16410: 
'FieldPath field names may not start with '$'.' on server localhost:27017. The 
full response is \{ "ok" : 0.0, "errmsg" : "FieldPath field names may not start 
with '$'.", "code" : 16410, "codeName" : "Location16410" }

 

Could you please provide some sample calcite queries with joins on mongodb.

 

 

 

> Calcite - mongodb - Returns row but no data displayed.
> ------------------------------------------------------
>
>                 Key: CALCITE-2426
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2426
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: sathishkumar
>            Assignee: Julian Hyde
>            Priority: Critical
>
> sqlline version 1.3.0
>  sqlline> !connect 
> jdbc:calcite:schemaFactory=org.apache.calcite.adapter.mongodb.MongoSchemaFactory;schema.host=localhost;schema.database=*****;
>  admin admin
>  0: jdbc:calcite:schemaFactory=org.apache.calc> !tables
>  
>  
> +------------+------------++------------------------++-------------------++-----------------------++--------------------
> |TABLE_CAT|TABLE_SCHEM|TABLE_NAME|TABLE_TYPE|REMARKS|TYPE_CAT|TYPE_SCHEM|TYPE_NAME|SELF_REFERENCING_C|
> +------------+------------++------------------------++-------------------++-----------------------++--------------------
> | |adhoc|company_preferences|TABLE| | | | | |
> | |adhoc|property|TABLE| | | | | |
> | |adhoc|templates|TABLE| | | | | |
> | |adhoc|user_preferences|TABLE| | | | | |
> *| | adhoc | users | TABLE | | | | | |*
> | |metadata|COLUMNS|SYSTEM TABLE| | | | | |
> | |metadata|TABLES|SYSTEM TABLE| | | | | |
> +------------+------------++------------------------++-------------------++-----------------------++--------------------
>  0: jdbc:calcite:schemaFactory=org.apache.calc> *select * from "users";*
>  +------+
> |_MAP|
> +------+
> | |
> +------+
>  *1 row selected (0.584 seconds)*
>  0: jdbc:calcite:schemaFactory=org.apache.calc>



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to