Hi,

Have tried Calcite's MongoDB adapter

SELECT _MAP['id'] as id, _MAP['name'] as name, _MAP['someRef'] as someRef
FROM myCollection

definitely works fine, and the problem appeared when I added JOIN

SELECT col1._MAP['id'] as id, col1._MAP['name'] as name,
col1._MAP['someRef'] as someRef, col2._MAP['name'] as name2 FROM
myCollection as col1 LEFT JOIN col2 on col1._MAP['someRef'] =
col2._MAP['id']

it leads to mongo projections [{$project: {_MAP: 1, '$f1': '$someRef'}}]
and [{$project: {'$f1': '$id'}}] - that is illegal as fieldPath field names
may not start with '$'.

Is it an issue or wrong usage ?

-- 
Regards, Vladimir Dolzhenko.

Reply via email to