Elasticsearch "Failed to parse date time value" bug

Hello!

We have our ES cluster with an index and one of the fields is mapped as such:

“fieldname”: {
“type”: “date”,
“format”: “dd-MM-yyyy”
},

When trying to use Dremio (Windows, UI version) it then struggles to connect to the index with the following error (date value has been masked):

Failed to parse date time value ______ in field fieldname.

Upon looking at the logs it appears it’s trying parse this as a date AND time field rather than just date.

at com.dremio.common.exceptions.UserException$Builder.build(UserException.java:746) ~[dremio-common-2.1.4-201808302048550610-0981242.jar:2.1.4-201808302048550610-0981242]
at com.dremio.plugins.elastic.execution.WriteHolders.getMillis(WriteHolders.java:370) [dremio-elasticsearch-plugin-2.1.4-201808302048550610-0981242.jar:2.1.4-201808302048550610-0981242]
at com.dremio.plugins.elastic.execution.WriteHolders.access$100(WriteHolders.java:45) [dremio-elasticsearch-plugin-2.1.4-201808302048550610-0981242.jar:2.1.4-201808302048550610-0981242]
at com.dremio.plugins.elastic.execution.WriteHolders$TimestampWriteHolder.write(WriteHolders.java:356) [dremio-elasticsearch-plugin-2.1.4-201808302048550610-0981242.jar:2.1.4-201808302048550610-0981242]
at com.dremio.plugins.elastic.execution.WriteHolders$TimestampWriteHolder.writeMap(WriteHolders.java:347) [dremio-elasticsearch-plugin-2.1.4-201808302048550610-0981242.jar:2.1.4-201808302048550610-0981242]
at com.dremio.plugins.elastic.execution.FieldReadDefinition.writeMap(FieldReadDefinition.java:132) [dremio-elasticsearch-plugin-2.1.4-201808302048550610-0981242.jar:2.1.4-201808302048550610-0981242]
at com.dremio.plugins.elastic.execution.ElasticsearchJsonReader.writeDeclaredMap(ElasticsearchJsonReader.java:328) [dremio-elasticsearch-plugin-2.1.4-201808302048550610-0981242.jar:2.1.4-201808302048550610-0981242]
at com.dremio.plugins.elastic.execution.ElasticsearchJsonReader.writeDeclaredMap(ElasticsearchJsonReader.java:324) [dremio-elasticsearch-plugin-2.1.4-201808302048550610-0981242.jar:2.1.4-201808302048550610-0981242]
at com.dremio.plugins.elastic.execution.ElasticsearchJsonReader.writeDeclaredMap(ElasticsearchJsonReader.java:324) [dremio-elasticsearch-plugin-2.1.4-201808302048550610-0981242.jar:2.1.4-201808302048550610-0981242]
at com.dremio.plugins.elastic.execution.ElasticsearchJsonReader.writeToVector(ElasticsearchJsonReader.java:214) [dremio-elasticsearch-plugin-2.1.4-201808302048550610-0981242.jar:2.1.4-201808302048550610-0981242]
at com.dremio.plugins.elastic.execution.ElasticsearchJsonReader.write(ElasticsearchJsonReader.java:182) [dremio-elasticsearch-plugin-2.1.4-201808302048550610-0981242.jar:2.1.4-201808302048550610-0981242]

Is this a bug that needs to be fixed or is there something we can do to fix it?

Thanks

Hi @nathanemmison

Can you please provide us with the job profile?

Thanks
@balaji.ramaswamy

Hi,

Due to the confidential nature of our data and system I can’t share that.

Is there something specific in the profile that you are looking for?

It definitely appears as though it is trying to run a function called .getMillis() when this is only a date value and not a time.

In addition, this error also comes up even when I’m not selecting this field in a query.

@balaji.ramaswamy

A query profile helps understand what is being run, what Dremio’s query planner is doing behind the scene, and ultimately a deeper look into the possible error’s stacktrace. Ultimately, it would help us repro the issue internally.

Unfortunately I will not be able to share it.

For job summary it has this:

No planning phase information to show

State: FAILED
Coordinator: IP ADDRESS
Threads: 0
Planning Time: Still planning

The Threads, Nodes and Operators tables are all empty.

The full stack trace:

 2018-09-14 14:40:51,359 [2464459d-766a-f3aa-945c-bc735b7e3c00:foreman] INFO  c.d.p.elastic.execution.WriteHolders - User Error Occurred [ErrorId: 858c8969-6591-4af3-b193-50def2bda6d4]
 com.dremio.common.exceptions.UserException: Failed to parse date time value _____ in field _______.
    	at com.dremio.common.exceptions.UserException$Builder.build(UserException.java:746) ~[dremio-common-2.1.4-201808302048550610-0981242.jar:2.1.4-201808302048550610-0981242]
    	at com.dremio.plugins.elastic.execution.WriteHolders.getMillis(WriteHolders.java:370) [dremio-elasticsearch-plugin-2.1.4-201808302048550610-0981242.jar:2.1.4-201808302048550610-0981242]
    	at com.dremio.plugins.elastic.execution.WriteHolders.access$100(WriteHolders.java:45) [dremio-elasticsearch-plugin-2.1.4-201808302048550610-0981242.jar:2.1.4-201808302048550610-0981242]
    	at com.dremio.plugins.elastic.execution.WriteHolders$TimestampWriteHolder.write(WriteHolders.java:356) [dremio-elasticsearch-plugin-2.1.4-201808302048550610-0981242.jar:2.1.4-201808302048550610-0981242]
    	at com.dremio.plugins.elastic.execution.WriteHolders$TimestampWriteHolder.writeMap(WriteHolders.java:347) [dremio-elasticsearch-plugin-2.1.4-201808302048550610-0981242.jar:2.1.4-201808302048550610-0981242]
    	at com.dremio.plugins.elastic.execution.FieldReadDefinition.writeMap(FieldReadDefinition.java:132) [dremio-elasticsearch-plugin-2.1.4-201808302048550610-0981242.jar:2.1.4-201808302048550610-0981242]
    	at com.dremio.plugins.elastic.execution.ElasticsearchJsonReader.writeDeclaredMap(ElasticsearchJsonReader.java:328) [dremio-elasticsearch-plugin-2.1.4-201808302048550610-0981242.jar:2.1.4-201808302048550610-0981242]
    	at com.dremio.plugins.elastic.execution.ElasticsearchJsonReader.writeDeclaredMap(ElasticsearchJsonReader.java:324) [dremio-elasticsearch-plugin-2.1.4-201808302048550610-0981242.jar:2.1.4-201808302048550610-0981242]
    	at com.dremio.plugins.elastic.execution.ElasticsearchJsonReader.writeDeclaredMap(ElasticsearchJsonReader.java:324) [dremio-elasticsearch-plugin-2.1.4-201808302048550610-0981242.jar:2.1.4-201808302048550610-0981242]
    	at com.dremio.plugins.elastic.execution.ElasticsearchJsonReader.writeToVector(ElasticsearchJsonReader.java:214) [dremio-elasticsearch-plugin-2.1.4-201808302048550610-0981242.jar:2.1.4-201808302048550610-0981242]
    	at com.dremio.plugins.elastic.execution.ElasticsearchJsonReader.write(ElasticsearchJsonReader.java:182) [dremio-elasticsearch-plugin-2.1.4-201808302048550610-0981242.jar:2.1.4-201808302048550610-0981242]
    	at com.dremio.plugins.elastic.execution.ElasticsearchRecordReader.next(ElasticsearchRecordReader.java:351) [dremio-elasticsearch-plugin-2.1.4-201808302048550610-0981242.jar:2.1.4-201808302048550610-0981242]
    	at com.dremio.plugins.elastic.ElasticTableBuilder.getSampledSchema(ElasticTableBuilder.java:322) [dremio-elasticsearch-plugin-2.1.4-201808302048550610-0981242.jar:2.1.4-201808302048550610-0981242]
    	at com.dremio.plugins.elastic.ElasticTableBuilder.populate(ElasticTableBuilder.java:190) [dremio-elasticsearch-plugin-2.1.4-201808302048550610-0981242.jar:2.1.4-201808302048550610-0981242]
    	at com.dremio.plugins.elastic.ElasticTableBuilder.buildIfNecessary(ElasticTableBuilder.java:161) [dremio-elasticsearch-plugin-2.1.4-201808302048550610-0981242.jar:2.1.4-201808302048550610-0981242]
    	at com.dremio.plugins.elastic.ElasticTableBuilder.getDataset(ElasticTableBuilder.java:142) [dremio-elasticsearch-plugin-2.1.4-201808302048550610-0981242.jar:2.1.4-201808302048550610-0981242]
    	at com.dremio.exec.catalog.DatasetManager.getTableFromPlugin(DatasetManager.java:298) [dremio-sabot-kernel-2.1.4-201808302048550610-0981242.jar:2.1.4-201808302048550610-0981242]
    	at com.dremio.exec.catalog.DatasetManager.getTable(DatasetManager.java:191) [dremio-sabot-kernel-2.1.4-201808302048550610-0981242.jar:2.1.4-201808302048550610-0981242]
    	at com.dremio.exec.catalog.CatalogImpl.getTable(CatalogImpl.java:135) [dremio-sabot-kernel-2.1.4-201808302048550610-0981242.jar:2.1.4-201808302048550610-0981242]
    	at com.dremio.exec.catalog.DelegatingCatalog.getTable(DelegatingCatalog.java:58) [dremio-sabot-kernel-2.1.4-201808302048550610-0981242.jar:2.1.4-201808302048550610-0981242]
    	at com.dremio.exec.catalog.CachingCatalog.getTable(CachingCatalog.java:66) [dremio-sabot-kernel-2.1.4-201808302048550610-0981242.jar:2.1.4-201808302048550610-0981242]
    	at com.dremio.exec.catalog.DremioCatalogReader.getTable(DremioCatalogReader.java:94) [dremio-sabot-kernel-2.1.4-201808302048550610-0981242.jar:2.1.4-201808302048550610-0981242]
    	at com.dremio.exec.catalog.DremioCatalogReader.getTable(DremioCatalogReader.java:71) [dremio-sabot-kernel-2.1.4-201808302048550610-0981242.jar:2.1.4-201808302048550610-0981242]
    	at org.apache.calcite.sql.validate.EmptyScope.getTableNamespace(EmptyScope.java:76) [calcite-core-1.16.0-201807312206090258-e1b02e7.jar:1.16.0-201807312206090258-e1b02e7]
    	at org.apache.calcite.sql.validate.DelegatingScope.getTableNamespace(DelegatingScope.java:197) [calcite-core-1.16.0-201807312206090258-e1b02e7.jar:1.16.0-201807312206090258-e1b02e7]
    	at org.apache.calcite.sql.validate.IdentifierNamespace.resolveImpl(IdentifierNamespace.java:102) [calcite-core-1.16.0-201807312206090258-e1b02e7.jar:1.16.0-201807312206090258-e1b02e7]
    	at org.apache.calcite.sql.validate.IdentifierNamespace.validateImpl(IdentifierNamespace.java:120) [calcite-core-1.16.0-201807312206090258-e1b02e7.jar:1.16.0-201807312206090258-e1b02e7]
    	at org.apache.calcite.sql.validate.AbstractNamespace.validate(AbstractNamespace.java:84) [calcite-core-1.16.0-201807312206090258-e1b02e7.jar:1.16.0-201807312206090258-e1b02e7]
    	at org.apache.calcite.sql.validate.SqlValidatorImpl.validateNamespace(SqlValidatorImpl.java:943) [calcite-core-1.16.0-201807312206090258-e1b02e7.jar:1.16.0-201807312206090258-e1b02e7]
    	at org.apache.calcite.sql.validate.SqlValidatorImpl.validateQuery(SqlValidatorImpl.java:924) [calcite-core-1.16.0-201807312206090258-e1b02e7.jar:1.16.0-201807312206090258-e1b02e7]
    	at org.apache.calcite.sql.validate.SqlValidatorImpl.validateFrom(SqlValidatorImpl.java:2971) [calcite-core-1.16.0-201807312206090258-e1b02e7.jar:1.16.0-201807312206090258-e1b02e7]
    	at org.apache.calcite.sql.validate.SqlValidatorImpl.validateFrom(SqlValidatorImpl.java:2956) [calcite-core-1.16.0-201807312206090258-e1b02e7.jar:1.16.0-201807312206090258-e1b02e7]
    	at org.apache.calcite.sql.validate.SqlValidatorImpl.validateSelect(SqlValidatorImpl.java:3197) [calcite-core-1.16.0-201807312206090258-e1b02e7.jar:1.16.0-201807312206090258-e1b02e7]
    	at org.apache.calcite.sql.validate.SelectNamespace.validateImpl(SelectNamespace.java:60) [calcite-core-1.16.0-201807312206090258-e1b02e7.jar:1.16.0-201807312206090258-e1b02e7]
    	at org.apache.calcite.sql.validate.AbstractNamespace.validate(AbstractNamespace.java:84) [calcite-core-1.16.0-201807312206090258-e1b02e7.jar:1.16.0-201807312206090258-e1b02e7]
    	at org.apache.calcite.sql.validate.SqlValidatorImpl.validateNamespace(SqlValidatorImpl.java:943) [calcite-core-1.16.0-201807312206090258-e1b02e7.jar:1.16.0-201807312206090258-e1b02e7]
    	at org.apache.calcite.sql.validate.SqlValidatorImpl.validateQuery(SqlValidatorImpl.java:924) [calcite-core-1.16.0-201807312206090258-e1b02e7.jar:1.16.0-201807312206090258-e1b02e7]
    	at org.apache.calcite.sql.SqlSelect.validate(SqlSelect.java:226) [calcite-core-1.16.0-201807312206090258-e1b02e7.jar:1.16.0-201807312206090258-e1b02e7]
    	at org.apache.calcite.sql.validate.SqlValidatorImpl.validateScopedExpression(SqlValidatorImpl.java:899) [calcite-core-1.16.0-201807312206090258-e1b02e7.jar:1.16.0-201807312206090258-e1b02e7]
    	at org.apache.calcite.sql.validate.SqlValidatorImpl.validate(SqlValidatorImpl.java:609) [calcite-core-1.16.0-201807312206090258-e1b02e7.jar:1.16.0-201807312206090258-e1b02e7]
    	at com.dremio.exec.planner.sql.SqlConverter.validate(SqlConverter.java:168) [dremio-sabot-kernel-2.1.4-201808302048550610-0981242.jar:2.1.4-201808302048550610-0981242]
    	at com.dremio.exec.planner.sql.handlers.PrelTransformer.validateNode(PrelTransformer.java:176) [dremio-sabot-kernel-2.1.4-201808302048550610-0981242.jar:2.1.4-201808302048550610-0981242]
    	at com.dremio.exec.planner.sql.handlers.PrelTransformer.validateAndConvert(PrelTransformer.java:165) [dremio-sabot-kernel-2.1.4-201808302048550610-0981242.jar:2.1.4-201808302048550610-0981242]
    	at com.dremio.exec.planner.sql.handlers.PrelTransformer.validateAndConvert(PrelTransformer.java:161) [dremio-sabot-kernel-2.1.4-201808302048550610-0981242.jar:2.1.4-201808302048550610-0981242]
    	at com.dremio.exec.planner.sql.handlers.query.NormalHandler.getPlan(NormalHandler.java:43) [dremio-sabot-kernel-2.1.4-201808302048550610-0981242.jar:2.1.4-201808302048550610-0981242]
    	at com.dremio.exec.planner.sql.handlers.commands.HandlerToExec.plan(HandlerToExec.java:69) [dremio-sabot-kernel-2.1.4-201808302048550610-0981242.jar:2.1.4-201808302048550610-0981242]
    	at com.dremio.exec.work.foreman.AttemptManager.run(AttemptManager.java:291) [dremio-sabot-kernel-2.1.4-201808302048550610-0981242.jar:2.1.4-201808302048550610-0981242]
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_181]
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_181]
    	at java.lang.Thread.run(Unknown Source) [na:1.8.0_181]

It seems another user had a similar problem:

@HokieKev

We are also facing this issue .
We use ES 5.5 with date format YYYY-MM-DD HH:MM:SS
The error that we get on the UI is Failed to parse date time value 2018-07-25 09:15:51 in field XXX