Hello Julian Hyde,
I have fixed almost all the issues. Please review & accept the contribution.
1. Change type of ElasticsearchRel.Implementor.list from List<Pair<String, String>> to List<String>. The left field only exists because Mongo has two query modes: find and aggregate.
2. Simplify ElasticsearchToEnumerableConverter.implement, removing unused variables
3. Convert .json to standard json format (double-quoted identifiers and strings, see e.g. druid-wiki-model.json)
4. Fix bad grammar resulting from search replace of "a Mongo" to "a Elasticsearch", e.g. in "Enumerator that reads from a Elasticsearch type" should be "an Elasticsearch" not "a Elasticsearch". Review all comments for grammar.
5. There are not tests for each data type (e.g. integer not null, date, timestamp, boolean) so I expect there are bugs.
Kept it as part of next tasks for enhancing the tests with foodmart dataset.
6. In adapter spec, show how to write a query against a raw table (i.e. using the _map column). Your example pre-supposes that people have built views against the raw table, which is not valid.
7. In elasticsearch_adapter.md, remove trailing spaces
8. Fix indentation in java code, especially for long argument and parameter lists. "," should be at the end of a line, not the start.
9. ElasticsearchRules.maybeQuote not used; remove other unused methods and code
10. There are a few references to Bug.CALCITE_194_FIXED; makes no sense because this is bug on the Mongo adapter
11. I may be wrong, but it looks as if code has been copied the Mongo adapter that is not needed for tests to pass. Remove the code, or better, add tests.
Issue fixed by removing code.
12. I think there's a bug if I put a scalar expression into a project or filter that the adapter cannot handle during code generation, e.g. "select x + 1 from t", "select * from t where x + 1 > 10". For each of these, can you add tests if it works, or log a bug?
Will log a bug.
13. Can you briefly list what should be the next work? What are the bugs, missing features? They don't need to be fixed now, but I would like to know where the holes are.
- Enhance tests with foodmart dataset.
- Support aggregation operations.