Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 04805200BFE for ; Mon, 16 Jan 2017 14:10:35 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 0322A160B22; Mon, 16 Jan 2017 13:10:35 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 4C058160B54 for ; Mon, 16 Jan 2017 14:10:34 +0100 (CET) Received: (qmail 78550 invoked by uid 500); 16 Jan 2017 13:10:33 -0000 Mailing-List: contact issues-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list issues@drill.apache.org Received: (qmail 78541 invoked by uid 99); 16 Jan 2017 13:10:33 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Jan 2017 13:10:33 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 045B2C0ABA for ; Mon, 16 Jan 2017 13:10:33 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.198 X-Spam-Level: X-Spam-Status: No, score=-1.198 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id ncuu2A7LUXZe for ; Mon, 16 Jan 2017 13:10:32 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 736255F2C5 for ; Mon, 16 Jan 2017 13:10:31 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 3C725E8660 for ; Mon, 16 Jan 2017 13:10:28 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id BF0C225288 for ; Mon, 16 Jan 2017 13:10:26 +0000 (UTC) Date: Mon, 16 Jan 2017 13:10:26 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-5097) Using store.parquet.reader.int96_as_timestamp gives IOOB whereas convert_from works MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 16 Jan 2017 13:10:35 -0000 [ https://issues.apache.org/jira/browse/DRILL-5097?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15823940#comment-15823940 ] ASF GitHub Bot commented on DRILL-5097: --------------------------------------- Github user vdiravka commented on a diff in the pull request: https://github.com/apache/drill/pull/697#discussion_r96213729 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/columnreaders/NullableFixedByteAlignedReaders.java --- @@ -132,6 +137,9 @@ protected void readField(long recordsToReadInThisPass) { valueVec.getMutator().setSafe(valuesReadInCurrentPass + i, getDateTimeValueFromBinary(binaryTimeStampValue)); } } + // The nanos precision is cut to millis. Therefore the length of single timestamp value is 8 bytes(s) + // instead of 12 byte(s). + dataTypeLengthInBits = timestampLengthInBits; --- End diff -- Yes, it is. Because when [`PARQUET_READER_INT96_AS_TIMESTAMP` is set to false]( https://github.com/apache/drill/blob/83513daf0903e0d94fcaad7b1ae4e8ad6272b494/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/columnreaders/ColumnReaderFactory.java#L246) `NullableFixedBinaryAsTimeStampReader` will not used. Instead of that `NullableFixedBinaryReader` will used. > Using store.parquet.reader.int96_as_timestamp gives IOOB whereas convert_from works > ----------------------------------------------------------------------------------- > > Key: DRILL-5097 > URL: https://issues.apache.org/jira/browse/DRILL-5097 > Project: Apache Drill > Issue Type: Bug > Components: Execution - Data Types, Storage - Parquet > Affects Versions: 1.9.0 > Reporter: Vitalii Diravka > Assignee: Vitalii Diravka > Fix For: Future > > Attachments: data.snappy.parquet > > > Using store.parquet.reader.int96_as_timestamp gives IOOB whereas convert_from works. > The below query succeeds: > {code} > select c, convert_from(d, 'TIMESTAMP_IMPALA') from dfs.`/drill/testdata/parquet_timestamp/spark_generated/d3`; > {code} > The below query fails: > {code} > 0: jdbc:drill:zk=10.10.100.190:5181> alter session set `store.parquet.reader.int96_as_timestamp` = true; > +-------+---------------------------------------------------+ > | ok | summary | > +-------+---------------------------------------------------+ > | true | store.parquet.reader.int96_as_timestamp updated. | > +-------+---------------------------------------------------+ > 1 row selected (0.231 seconds) > 0: jdbc:drill:zk=10.10.100.190:5181> select c, d from dfs.`/drill/testdata/parquet_timestamp/spark_generated/d3`; > Error: SYSTEM ERROR: IndexOutOfBoundsException: readerIndex: 0, writerIndex: 131076 (expected: 0 <= readerIndex <= writerIndex <= capacity(131072)) > Fragment 0:0 > [Error Id: bd94f477-7c01-420f-8920-06263212177b on qa-node190.qa.lab:31010] (state=,code=0) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)