Add a data adapter implementation that infers fields from annotations or properties#1829
Conversation
… or properties Signed-off-by: Johnathan Garrett <jd@prominentedge.com>
rfecher
left a comment
There was a problem hiding this comment.
I had just a couple comments
| assertTrue( | ||
| adapter.getFieldDescriptor("date").indexHints().contains(TimeField.TIME_DIMENSION_HINT)); | ||
|
|
||
| // final TestType testEntry = new TestType("id1", 2.5, 8, true); |
There was a problem hiding this comment.
why the commented out block?
There was a problem hiding this comment.
Oops, this was an oversight, I will update this test.
| SpatialField.LONGITUDE_DIMENSION_HINT); | ||
| || inputFieldDescriptors.get(1).indexHints().contains( | ||
| SpatialField.LATITUDE_DIMENSION_HINT) | ||
| || inputFieldDescriptors.get(0).fieldName().equalsIgnoreCase("longitude") |
There was a problem hiding this comment.
do we use inference on field names without hints in the case of an un-annotated POJO? I had assumed with an unannotated POJO you're stuck with default index behaviors as if there are no index hints, but in looking at this addition of checking for longitude field names am curious the reasoning if its not automatically inferring index mapping based on name?
There was a problem hiding this comment.
Currently, index mappings are only inferred based on type. Logic could be added to the mapping code to pass all compatible fields to the mapper and let the mapper pick appropriate fields, but that is not currently in place.
…appers Signed-off-by: Johnathan Garrett <jd@prominentedge.com>
No description provided.