-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/31066/
-----------------------------------------------------------
Review request for MetaModel.
Bugs: METAMODEL-79
https://issues.apache.org/jira/browse/METAMODEL-79
Repository: metamodel
Description
-------
Partial fix for METAMODEL-79 - see description
Diffs
-----
elasticsearch/src/main/java/org/apache/metamodel/elasticsearch/ElasticSearchCreateTableBuilder.java
PRE-CREATION
elasticsearch/src/main/java/org/apache/metamodel/elasticsearch/ElasticSearchDataContext.java
06353f1
elasticsearch/src/main/java/org/apache/metamodel/elasticsearch/ElasticSearchDropTableBuilder.java
PRE-CREATION
elasticsearch/src/main/java/org/apache/metamodel/elasticsearch/ElasticSearchInsertIntoBuilder.java
PRE-CREATION
elasticsearch/src/main/java/org/apache/metamodel/elasticsearch/ElasticSearchUpdateCallback.java
PRE-CREATION
elasticsearch/src/test/java/org/apache/metamodel/elasticsearch/ElasticSearchDataContextTest.java
449490b
Diff: https://reviews.apache.org/r/31066/diff/
Testing
-------
This is my initial/partial fix for METAMODEL-79. I want to share it because 1)
there's more to come but I want to confirm that I'm on the right way and 2) I
have questions for experts on E.S. :-)
This patch adds support for the MetaModel ElasticSearch to do INSERT INTO,
CREATE TABLE and DROP TABLE statements.
It does not (yet) have support for UPDATE or DELETE FROM statements. I wanted
to validate my initial work first.
And I have a few questions regarding types and mappings.
* Please check the ElasticSearchCreateTableBuilder.getType(Column) method.
Here I've attempted to convert ColumnTypes to ElasticSearch types. Are these
correct? I am not sure about generalizations such as the NUMERIC -> "double"
mapping etc.
* As a last resort I have used the type "object". But when I tried it out I
ran into the problem that "object" is not polymorphic like in Java, it is
actually the opposite of a "value type". So that means you cannot define an
"object" field and then insert a single value into it. This makes it a bad fit
for a "fallback" type. Is there a better way? Should we then simply NOT define
the field in the mapping maybe?
Thanks,
Kasper Sørensen