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 C05F8200C73 for ; Wed, 10 May 2017 22:34:40 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id BF012160B9C; Wed, 10 May 2017 20:34:40 +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 0F1A9160B99 for ; Wed, 10 May 2017 22:34:39 +0200 (CEST) Received: (qmail 30884 invoked by uid 500); 10 May 2017 20:34:39 -0000 Mailing-List: contact reviews-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list reviews@impala.incubator.apache.org Received: (qmail 30872 invoked by uid 99); 10 May 2017 20:34:39 -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; Wed, 10 May 2017 20:34:39 +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 8953FC031B for ; Wed, 10 May 2017 20:34:38 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.363 X-Spam-Level: X-Spam-Status: No, score=0.363 tagged_above=-999 required=6.31 tests=[RDNS_DYNAMIC=0.363, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id ACyC5mtzty00 for ; Wed, 10 May 2017 20:34:37 +0000 (UTC) Received: from ip-10-146-233-104.ec2.internal (ec2-75-101-130-251.compute-1.amazonaws.com [75.101.130.251]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id B56865F642 for ; Wed, 10 May 2017 20:34:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by ip-10-146-233-104.ec2.internal (8.14.4/8.14.4) with ESMTP id v4AKYZU6002927; Wed, 10 May 2017 20:34:35 GMT Message-Id: <201705102034.v4AKYZU6002927@ip-10-146-233-104.ec2.internal> Date: Wed, 10 May 2017 20:34:35 +0000 From: "Matthew Jacobs (Code Review)" To: impala-cr@cloudera.com, reviews@impala.incubator.apache.org CC: Marcel Kornacker Reply-To: mj@cloudera.com X-Gerrit-MessageType: comment Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-5137=3A_Support_pushing_TIMESTAMP_predicates_to_Kudu=0A?= X-Gerrit-Change-Id: I08b6c8354a408e7beb94c1a135c23722977246ea X-Gerrit-ChangeURL: X-Gerrit-Commit: b8aea0dddef0373a93eb5e6ae94b7ed15c8d68ea In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/2.12.7 archived-at: Wed, 10 May 2017 20:34:40 -0000 Matthew Jacobs has posted comments on this change. Change subject: IMPALA-5137: Support pushing TIMESTAMP predicates to Kudu ...................................................................... Patch Set 1: (6 comments) http://gerrit.cloudera.org:8080/#/c/6789/1/be/src/exprs/timestamp-functions-ir.cc File be/src/exprs/timestamp-functions-ir.cc: Line 127: return (tv.UtcToUnixTimeMicros(&result)) ? BigIntVal(result) : BigIntVal::null(); > i forgot: did we say we need abort_on_error to work for these conversions? We were going to do that on the read path (and I still have to do that), but that wouldn't apply here. The errors we're worried about are when unixtimes are outside of Impalas date range, which can't happen here. http://gerrit.cloudera.org:8080/#/c/6789/1/be/src/exprs/timestamp-functions.h File be/src/exprs/timestamp-functions.h: Line 67: static BigIntVal Unix(FunctionContext* context, const StringVal& string_val, > is there any reason why they all have the same name? I started renaming them but then realized they're aligned with the exposed function names, i.e. they are all exposed as functions named "unix_timestamp" (obviously with different parameters) Line 69: /// Converts 'tv_val' to a unix time_t. > please separate w/ blank lines, makes it easier to read Done http://gerrit.cloudera.org:8080/#/c/6789/1/fe/src/main/java/org/apache/impala/util/KuduUtil.java File fe/src/main/java/org/apache/impala/util/KuduUtil.java: Line 212: > trailing Done http://gerrit.cloudera.org:8080/#/c/6789/1/testdata/workloads/functional-planner/queries/PlannerTest/kudu-selectivity.test File testdata/workloads/functional-planner/queries/PlannerTest/kudu-selectivity.test: Line 151: timestamp_col < (seconds_add(cast('9999-12-31 24:59:59' as timestamp), 10)) > doesn't our timestamp literal already give you bounds checking? worth check Yes it does, it already evaluates to NULL - is that what you meant? I had it here more to be illustrative, but I can remove if this is confusing. http://gerrit.cloudera.org:8080/#/c/6789/1/testdata/workloads/functional-query/queries/QueryTest/kudu-scan-node.test File testdata/workloads/functional-query/queries/QueryTest/kudu-scan-node.test: Line 92: timestamp_col >= cast('2009-01-01 00:04:00.6' as timestamp) > add an out-of-bounds literal somewhere I'll add a separate query since it'll evaluate to NULL -- To view, visit http://gerrit.cloudera.org:8080/6789 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I08b6c8354a408e7beb94c1a135c23722977246ea Gerrit-PatchSet: 1 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Matthew Jacobs Gerrit-Reviewer: Marcel Kornacker Gerrit-Reviewer: Matthew Jacobs Gerrit-HasComments: Yes