IllegalStateException when performing a select * on an AWS ELasticsearch

Hi,

I have an issue when I try to perform a select * (SELECT * FROM } on an Elasticsearch index, dreamio display an error message “Unexpected error occurred”. This error happens only on one specific index, not on the other indices. It also doesn’t happen on another index with the same data mapping, but containing different data, which let me think that the issue might be related to the data or the data types.

Here is the stackstrace from the dreamio server:

2019-07-25 11:24:50,859 [e2 - 22c68aa2-da8a-531e-88ae-ff9a4bdacb00:frag:0:0] INFO  c.d.s.e.f.FragmentStatusReporter - 22c68aa2-da8a-531e-88ae-ff9a4bdacb00:0:0: State to report: CANCELLED
    2019-07-25 11:24:54,351 [e4 - 22c68aa2-da8a-531e-88ae-ff9a4bdacb00:frag:1:4] ERROR com.dremio.sabot.driver.SmartOp - IllegalStateException
    com.dremio.common.exceptions.UserException: IllegalStateException
    	at com.dremio.common.exceptions.UserException$Builder.build(UserException.java:773) ~[dremio-common-3.2.8-201907180222520740-08f2b54.jar:3.2.8-201907180222520740-08f2b54]
    	at com.dremio.sabot.driver.SmartOp.contextualize(SmartOp.java:135) [dremio-sabot-kernel-3.2.8-201907180222520740-08f2b54.jar:3.2.8-201907180222520740-08f2b54]
    	at com.dremio.sabot.driver.SmartOp$SmartProducer.outputData(SmartOp.java:518) [dremio-sabot-kernel-3.2.8-201907180222520740-08f2b54.jar:3.2.8-201907180222520740-08f2b54]
    	at com.dremio.sabot.driver.StraightPipe.pump(StraightPipe.java:56) [dremio-sabot-kernel-3.2.8-201907180222520740-08f2b54.jar:3.2.8-201907180222520740-08f2b54]
    	at com.dremio.sabot.driver.Pipeline.doPump(Pipeline.java:109) [dremio-sabot-kernel-3.2.8-201907180222520740-08f2b54.jar:3.2.8-201907180222520740-08f2b54]
    	at com.dremio.sabot.driver.Pipeline.pumpOnce(Pipeline.java:99) [dremio-sabot-kernel-3.2.8-201907180222520740-08f2b54.jar:3.2.8-201907180222520740-08f2b54]
    	at com.dremio.sabot.exec.fragment.FragmentExecutor$DoAsPumper.run(FragmentExecutor.java:307) [dremio-sabot-kernel-3.2.8-201907180222520740-08f2b54.jar:3.2.8-201907180222520740-08f2b54]
    	at com.dremio.sabot.exec.fragment.FragmentExecutor$DoAsPumper.run(FragmentExecutor.java:303) [dremio-sabot-kernel-3.2.8-201907180222520740-08f2b54.jar:3.2.8-201907180222520740-08f2b54]
    	at java.security.AccessController.doPrivileged(Native Method) [na:1.8.0_152]
    	at javax.security.auth.Subject.doAs(Subject.java:422) [na:1.8.0_152]
    	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1836) [hadoop-common-2.8.3.jar:na]
    	at com.dremio.sabot.exec.fragment.FragmentExecutor.run(FragmentExecutor.java:260) [dremio-sabot-kernel-3.2.8-201907180222520740-08f2b54.jar:3.2.8-201907180222520740-08f2b54]
    	at com.dremio.sabot.exec.fragment.FragmentExecutor.access$1200(FragmentExecutor.java:92) [dremio-sabot-kernel-3.2.8-201907180222520740-08f2b54.jar:3.2.8-201907180222520740-08f2b54]
    	at com.dremio.sabot.exec.fragment.FragmentExecutor$AsyncTaskImpl.run(FragmentExecutor.java:635) [dremio-sabot-kernel-3.2.8-201907180222520740-08f2b54.jar:3.2.8-201907180222520740-08f2b54]
    	at com.dremio.sabot.task.AsyncTaskWrapper.run(AsyncTaskWrapper.java:104) [dremio-sabot-kernel-3.2.8-201907180222520740-08f2b54.jar:3.2.8-201907180222520740-08f2b54]
    	at com.dremio.sabot.task.slicing.SlicingThread.mainExecutionLoop(SlicingThread.java:226) [dremio-ce-sabot-scheduler-3.2.8-201907180222520740-08f2b54.jar:3.2.8-201907180222520740-08f2b54]
    	at com.dremio.sabot.task.slicing.SlicingThread.run(SlicingThread.java:156) [dremio-ce-sabot-scheduler-3.2.8-201907180222520740-08f2b54.jar:3.2.8-201907180222520740-08f2b54]
    Caused by: java.lang.IllegalStateException: null
    	at com.dremio.plugins.elastic.execution.WriteHolders$InvalidWriteHolder.writeMap(WriteHolders.java:63) ~[dremio-elasticsearch-plugin-3.2.8-201907180222520740-08f2b54.jar:3.2.8-201907180222520740-08f2b54]
    	at com.dremio.plugins.elastic.execution.FieldReadDefinition.writeMap(FieldReadDefinition.java:178) ~[dremio-elasticsearch-plugin-3.2.8-201907180222520740-08f2b54.jar:3.2.8-201907180222520740-08f2b54]
    	at com.dremio.plugins.elastic.execution.ElasticsearchJsonReader.writeDeclaredMap(ElasticsearchJsonReader.java:328) ~[dremio-elasticsearch-plugin-3.2.8-201907180222520740-08f2b54.jar:3.2.8-201907180222520740-08f2b54]
    	at com.dremio.plugins.elastic.execution.ElasticsearchJsonReader.writeDeclaredMap(ElasticsearchJsonReader.java:324) ~[dremio-elasticsearch-plugin-3.2.8-201907180222520740-08f2b54.jar:3.2.8-201907180222520740-08f2b54]
    	at com.dremio.plugins.elastic.execution.ElasticsearchJsonReader.writeToVector(ElasticsearchJsonReader.java:214) ~[dremio-elasticsearch-plugin-3.2.8-201907180222520740-08f2b54.jar:3.2.8-201907180222520740-08f2b54]
    	at com.dremio.plugins.elastic.execution.ElasticsearchJsonReader.write(ElasticsearchJsonReader.java:182) ~[dremio-elasticsearch-plugin-3.2.8-201907180222520740-08f2b54.jar:3.2.8-201907180222520740-08f2b54]
    	at com.dremio.plugins.elastic.execution.ElasticsearchRecordReader.next(ElasticsearchRecordReader.java:276) ~[dremio-elasticsearch-plugin-3.2.8-201907180222520740-08f2b54.jar:3.2.8-201907180222520740-08f2b54]
    	at com.dremio.sabot.op.scan.ScanOperator.outputData(ScanOperator.java:240) ~[dremio-sabot-kernel-3.2.8-201907180222520740-08f2b54.jar:3.2.8-201907180222520740-08f2b54]
    	at com.dremio.sabot.driver.SmartOp$SmartProducer.outputData(SmartOp.java:516) [dremio-sabot-kernel-3.2.8-201907180222520740-08f2b54.jar:3.2.8-201907180222520740-08f2b54]
    	... 14 common frames omitted

If I try a query that is not a select *, it works, for instance SELECT max(price) FROM <my index>