You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
set session hive.timestamp_precision = 'NANOSECONDS';
create table test (a timestamp(9)) with (format = 'avro');
insert into test values (timestamp '1970-01-01 00:00:00');
Query 20240111_080943_00059_278c5 failed: Failed to write data page to Avro file
io.trino.spi.TrinoException: Failed to write data page to Avro file
at io.trino.plugin.hive.avro.AvroHiveFileWriter.appendRows(AvroHiveFileWriter.java:127)
at io.trino.plugin.hive.HiveWriter.append(HiveWriter.java:85)
at io.trino.plugin.hive.HivePageSink.writePage(HivePageSink.java:325)
at io.trino.plugin.hive.HivePageSink.appendPage(HivePageSink.java:274)
at io.trino.plugin.base.classloader.ClassLoaderSafeConnectorPageSink.appendPage(ClassLoaderSafeConnectorPageSink.java:68)
at io.trino.operator.TableWriterOperator.addInput(TableWriterOperator.java:278)
at io.trino.operator.Driver.processInternal(Driver.java:403)
at io.trino.operator.Driver.lambda$process$8(Driver.java:301)
at io.trino.operator.Driver.tryWithLock(Driver.java:704)
at io.trino.operator.Driver.process(Driver.java:293)
at io.trino.operator.Driver.processForDuration(Driver.java:264)
at io.trino.execution.SqlTaskExecution$DriverSplitRunner.processFor(SqlTaskExecution.java:887)
at io.trino.execution.executor.timesharing.PrioritizedSplitRunner.process(PrioritizedSplitRunner.java:187)
at io.trino.execution.executor.timesharing.TimeSharingTaskExecutor$TaskRunner.run(TimeSharingTaskExecutor.java:565)
at io.trino.$gen.Trino_testversion____20240111_073142_75.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.io.IOException: Error writing to avro file
at io.trino.hive.formats.avro.AvroFileWriter.write(AvroFileWriter.java:80)
at io.trino.plugin.hive.avro.AvroHiveFileWriter.appendRows(AvroHiveFileWriter.java:124)
... 17 more
Caused by: org.apache.avro.file.DataFileWriter.AppendWriteException: java.lang.ClassCastException: class io.trino.spi.type.LongTimestamp cannot be cast to class io.trino.spi.type.SqlTimestamp (io.trino.spi.type.LongTimestamp and io.trino.spi.type.SqlTimestamp are in unnamed module of loader 'app')
at org.apache.avro.file.DataFileWriter.append(DataFileWriter.java:317)
at io.trino.hive.formats.avro.AvroFileWriter.write(AvroFileWriter.java:77)
... 18 more
Caused by: java.lang.ClassCastException: class io.trino.spi.type.LongTimestamp cannot be cast to class io.trino.spi.type.SqlTimestamp (io.trino.spi.type.LongTimestamp and io.trino.spi.type.SqlTimestamp are in unnamed module of loader 'app')
at io.trino.plugin.hive.avro.HiveAvroTypeManager.lambda$overrideBlockToAvroObject$6(HiveAvroTypeManager.java:222)
at io.trino.hive.formats.avro.AvroPagePositionDataWriter$UserDefinedBlockPositionEncoder.encodeFromBlock(AvroPagePositionDataWriter.java:585)
at io.trino.hive.formats.avro.AvroPagePositionDataWriter$BlockPositionEncoder.encode(AvroPagePositionDataWriter.java:142)
at io.trino.hive.formats.avro.AvroPagePositionDataWriter$RecordBlockPositionEncoder.encodeInternal(AvroPagePositionDataWriter.java:563)
at io.trino.hive.formats.avro.AvroPagePositionDataWriter$RecordBlockPositionEncoder.encodePositionInEachChannel(AvroPagePositionDataWriter.java:555)
at io.trino.hive.formats.avro.AvroPagePositionDataWriter.write(AvroPagePositionDataWriter.java:106)
at io.trino.hive.formats.avro.AvroPagePositionDataWriter.write(AvroPagePositionDataWriter.java:61)
at org.apache.avro.file.DataFileWriter.append(DataFileWriter.java:314)
... 19 more
The above INSERT statement succeeds once change to other precisions.
set session hive.timestamp_precision = 'MICROSECONDS';
insert into test values (timestamp '1970-01-01 00:00:00');
INSERT: 1 row
The text was updated successfully, but these errors were encountered:
The above INSERT statement succeeds once change to other precisions.
The text was updated successfully, but these errors were encountered: