All our datawarehouse tables contain a couple of timestamp columns and a json type column. When querying these tables in 3.1.8 or 3.1.10 on Centos 7 Linux, we get an error in the logs as below.
The same query on the same database server from Windows dremio 3.0 works.
The value the error complains about, {1}, seems to come from a different column than the timestamp columns. Perhaps Dremio or JDBC is looking at the wrong column due to skipping the json-typed column?
We already tried whether upgrading the PostgreSQL JDBC driver would help, hence the log lists version 42.2.5 instead of the provided 42.1.1.
The server log spits out:
2019-04-26 11:59:12,191 [233d2990-e984-d5eb-1403-245a31a27e00:foreman] INFO c.d.s.fabric.FabricConnectionManager - [FABRIC]: No connection active, opening new connection to ensdw.vredestein.com:45678.
2019-04-26 11:59:12,308 [FABRIC-rpc-event-queue] INFO c.d.sabot.exec.FragmentExecutors - Received remote fragment start instruction for 233d2990-e984-d5eb-1403-245a31a27e00:0:0
2019-04-26 11:59:12,337 [FABRIC-rpc-event-queue] INFO c.d.sabot.exec.FragmentExecutors - Received remote fragment start instruction for 233d2990-e984-d5eb-1403-245a31a27e00:1:0
2019-04-26 11:59:12,715 [e1 - 233d2990-e984-d5eb-1403-245a31a27e00:frag:1:0] INFO c.d.exec.store.jdbc.JdbcRecordReader - User Error Occurred [ErrorId: 0e99442a-0f4f-44f8-995c-c66d8271d936]
com.dremio.common.exceptions.UserException: Failure while attempting to read from database.
at com.dremio.common.exceptions.UserException$Builder.build(UserException.java:746) ~[dremio-common-3.1.10-201904162146020182-adf690d.jar:3.1.10-201904162146020182-adf690d]
at com.dremio.exec.store.jdbc.JdbcRecordReader.next(JdbcRecordReader.java:250) [dremio-extra-plugin-jdbc-3.1.10-201904162146020182-adf690d.jar:3.1.10-201904162146020182-adf690d]
at com.dremio.exec.store.CoercionReader.next(CoercionReader.java:212) [dremio-sabot-kernel-3.1.10-201904162146020182-adf690d.jar:3.1.10-201904162146020182-adf690d]
at com.dremio.sabot.op.scan.ScanOperator.outputData(ScanOperator.java:215) [dremio-sabot-kernel-3.1.10-201904162146020182-adf690d.jar:3.1.10-201904162146020182-adf690d]
at com.dremio.sabot.driver.SmartOp$SmartProducer.outputData(SmartOp.java:526) [dremio-sabot-kernel-3.1.10-201904162146020182-adf690d.jar:3.1.10-201904162146020182-adf690d]
at com.dremio.sabot.driver.StraightPipe.pump(StraightPipe.java:56) [dremio-sabot-kernel-3.1.10-201904162146020182-adf690d.jar:3.1.10-201904162146020182-adf690d]
at com.dremio.sabot.driver.Pipeline.doPump(Pipeline.java:109) [dremio-sabot-kernel-3.1.10-201904162146020182-adf690d.jar:3.1.10-201904162146020182-adf690d]
at com.dremio.sabot.driver.Pipeline.pumpOnce(Pipeline.java:99) [dremio-sabot-kernel-3.1.10-201904162146020182-adf690d.jar:3.1.10-201904162146020182-adf690d]
at com.dremio.sabot.exec.fragment.FragmentExecutor$DoAsPumper.run(FragmentExecutor.java:311) [dremio-sabot-kernel-3.1.10-201904162146020182-adf690d.jar:3.1.10-201904162146020182-adf690d]
at com.dremio.sabot.exec.fragment.FragmentExecutor$DoAsPumper.run(FragmentExecutor.java:307) [dremio-sabot-kernel-3.1.10-201904162146020182-adf690d.jar:3.1.10-201904162146020182-adf690d]
at java.security.AccessController.doPrivileged(Native Method) [na:1.8.0_201]
at javax.security.auth.Subject.doAs(Subject.java:422) [na:1.8.0_201]
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:264) [dremio-sabot-kernel-3.1.10-201904162146020182-adf690d.jar:3.1.10-201904162146020182-adf690d]
at com.dremio.sabot.exec.fragment.FragmentExecutor.access$1000(FragmentExecutor.java:93) [dremio-sabot-kernel-3.1.10-201904162146020182-adf690d.jar:3.1.10-201904162146020182-adf690d]
at com.dremio.sabot.exec.fragment.FragmentExecutor$AsyncTaskImpl.run(FragmentExecutor.java:619) [dremio-sabot-kernel-3.1.10-201904162146020182-adf690d.jar:3.1.10-201904162146020182-adf690d]
at com.dremio.sabot.task.AsyncTaskWrapper.run(AsyncTaskWrapper.java:103) [dremio-sabot-kernel-3.1.10-201904162146020182-adf690d.jar:3.1.10-201904162146020182-adf690d]
at com.dremio.sabot.task.slicing.SlicingThread.mainExecutionLoop(SlicingThread.java:123) [dremio-extra-sabot-scheduler-3.1.10-201904162146020182-adf690d.jar:3.1.10-201904162146020182-adf690d]
at com.dremio.sabot.task.slicing.SlicingThread.run(SlicingThread.java:68) [dremio-extra-sabot-scheduler-3.1.10-201904162146020182-adf690d.jar:3.1.10-201904162146020182-adf690d]
Caused by: org.postgresql.util.PSQLException: Bad value for type timestamp/date/time: {1}
at org.postgresql.jdbc.TimestampUtils.parseBackendTimestamp(TimestampUtils.java:365) ~[postgresql-42.2.5.jar:42.2.5]
at org.postgresql.jdbc.TimestampUtils.toTimestamp(TimestampUtils.java:396) ~[postgresql-42.2.5.jar:42.2.5]
at org.postgresql.jdbc.TimestampUtils.toDate(TimestampUtils.java:520) ~[postgresql-42.2.5.jar:42.2.5]
at org.postgresql.jdbc.PgResultSet.getDate(PgResultSet.java:498) ~[postgresql-42.2.5.jar:42.2.5]
at org.apache.commons.dbcp2.DelegatingResultSet.getDate(DelegatingResultSet.java:682) ~[commons-dbcp2-2.2.0.jar:2.2.0]
at org.apache.commons.dbcp2.DelegatingResultSet.getDate(DelegatingResultSet.java:682) ~[commons-dbcp2-2.2.0.jar:2.2.0]
at com.dremio.exec.store.jdbc.JdbcRecordReader$DateCopier.copy(JdbcRecordReader.java:540) ~[dremio-extra-plugin-jdbc-3.1.10-201904162146020182-adf690d.jar:3.1.10-201904162146020182-adf690d]
at com.dremio.exec.store.jdbc.JdbcRecordReader.next(JdbcRecordReader.java:240) [dremio-extra-plugin-jdbc-3.1.10-201904162146020182-adf690d.jar:3.1.10-201904162146020182-adf690d]
… 17 common frames omitted
Caused by: java.lang.NumberFormatException: Timestamp has neither date nor time
at org.postgresql.jdbc.TimestampUtils.parseBackendTimestamp(TimestampUtils.java:360) ~[postgresql-42.2.5.jar:42.2.5]
… 24 common frames omitted
2019-04-26 11:59:12,772 [e0 - 233d2990-e984-d5eb-1403-245a31a27e00:frag:0:0] INFO c.d.s.e.f.FragmentStatusReporter - 233d2990-e984-d5eb-1403-245a31a27e00:0:0: State to report: CANCELLED