Return-Path: X-Original-To: apmail-asterixdb-notifications-archive@minotaur.apache.org Delivered-To: apmail-asterixdb-notifications-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9DBB918BDC for ; Tue, 9 Feb 2016 05:56:59 +0000 (UTC) Received: (qmail 36263 invoked by uid 500); 9 Feb 2016 05:56:59 -0000 Delivered-To: apmail-asterixdb-notifications-archive@asterixdb.apache.org Received: (qmail 36231 invoked by uid 500); 9 Feb 2016 05:56:59 -0000 Mailing-List: contact notifications-help@asterixdb.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@asterixdb.incubator.apache.org Delivered-To: mailing list notifications@asterixdb.incubator.apache.org Received: (qmail 36222 invoked by uid 99); 9 Feb 2016 05:56:59 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Feb 2016 05:56:59 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 25494180179 for ; Tue, 9 Feb 2016 05:56:59 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.127 X-Spam-Level: ** X-Spam-Status: No, score=2.127 tagged_above=-999 required=6.31 tests=[MISSING_HEADERS=1.207, SPF_FAIL=0.919, WEIRD_QUOTING=0.001] autolearn=disabled Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id Ru0Ckt2iuiJ0 for ; Tue, 9 Feb 2016 05:56:57 +0000 (UTC) Received: from unhygienix.ics.uci.edu (unhygienix.ics.uci.edu [128.195.14.130]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTP id 7986042A54 for ; Tue, 9 Feb 2016 05:56:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by unhygienix.ics.uci.edu (Postfix) with ESMTP id E9E8B2418B9; Mon, 8 Feb 2016 21:52:38 -0800 (PST) Date: Mon, 8 Feb 2016 21:52:38 -0800 From: "Yingyi Bu (Code Review)" CC: Jenkins , Jianfeng Jia , abdullah alamoudi , Michael Blow , Till Westmann , Preston Carman Reply-To: buyingyi@gmail.com X-Gerrit-MessageType: comment Subject: Change in asterixdb[master]: Move to non-copy-based evaluator interfaces for all function... X-Gerrit-Change-Id: If132857cf8d707ce96951f12ba6dd86f54aa4069 X-Gerrit-ChangeURL: X-Gerrit-Commit: 9ce50a457bc8786f880bca9c6fa843a58f281738 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.8.4 Message-Id: <20160209055238.E9E8B2418B9@unhygienix.ics.uci.edu> Yingyi Bu has posted comments on this change. Change subject: Move to non-copy-based evaluator interfaces for all function implementations, including: - scalar functions, - aggregate functions, - running aggregate functions, - unnesting functions ...................................................................... Patch Set 7: (14 comments) https://asterix-gerrit.ics.uci.edu/#/c/615/7/asterix-app/src/test/resources/runtimets/results/string/substring-after-4/substring-after-4.1.adm File asterix-app/src/test/resources/runtimets/results/string/substring-after-4/substring-after-4.1.adm: Line 1: { "result1": "HEllow", "result2": null, "result3": null, "result4": "", "result5": null } > Why are there changes in the query result? The old result is wrong. The query is this: let $c1 := substring-after("HEllow","") let $c2 := substring-after("HEllow",null) let $c3 := substring-after("",null) let $c4 := substring-after("","") let $c5 := substring-after(null,null) return {"result1": $c1, "result2": $c2, "result3": $c3, "result4": $c4, "result5": $c5} Null input should result in null output, for this case. https://asterix-gerrit.ics.uci.edu/#/c/615/7/asterix-app/src/test/resources/runtimets/results/string/substring-before-3/substring-before-3.1.adm File asterix-app/src/test/resources/runtimets/results/string/substring-before-3/substring-before-3.1.adm: Line 1: { "result1": "", "result2": null, "result3": null, "result4": "", "result5": null } > Why are there changes in the query result? The old is wrong. The query is this: let $c1 := substring-before("HEllow","") let $c2 := substring-before("HEllow",null) let $c3 := substring-before("",null) let $c4 := substring-before("","") let $c5 := substring-before(null,null) return {"result1": $c1, "result2": $c2, "result3": $c3, "result4": $c4, "result5": $c5} Any null parameter should result in null output. https://asterix-gerrit.ics.uci.edu/#/c/615/7/asterix-om/src/main/java/org/apache/asterix/om/functions/IFunctionDescriptor.java File asterix-om/src/main/java/org/apache/asterix/om/functions/IFunctionDescriptor.java: Line 39: public IRunningAggregateEvaluatorFactory createRunningAggregateFunctionFactory(final IScalarEvaluatorFactory[] args) > s/Function/Evaluator/ ? Done Line 42: public ICopySerializableAggregateFunctionFactory createSerializableAggregateFunctionFactory( > s/Function/Evaluator/ ? Done Line 45: public IUnnestingEvaluatorFactory createUnnestingFunctionFactory(final IScalarEvaluatorFactory[] args) > s/Function/Evaluator/ ? Done Line 48: public IAggregateEvaluatorFactory createAggregateFunctionFactory(final IScalarEvaluatorFactory[] args) > s/Function/Evaluator/ ? Done https://asterix-gerrit.ics.uci.edu/#/c/615/7/asterix-om/src/main/java/org/apache/asterix/om/types/ATypeTag.java File asterix-om/src/main/java/org/apache/asterix/om/types/ATypeTag.java: Line 131: } > How about Done https://asterix-gerrit.ics.uci.edu/#/c/615/7/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/collections/ListifyAggregateFunctionEvalFactory.java File asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/collections/ListifyAggregateFunctionEvalFactory.java: Line 56: private DataOutput out = resultStorage.getDataOutput(); > The relationship between "resultStorage" and "out" is not the obvious when Done https://asterix-gerrit.ics.uci.edu/#/c/615/7/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractAvgAggregateFunction.java File asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractAvgAggregateFunction.java: Line 67: private DataOutput out = resultStorage.getDataOutput(); > The relationship between "resultStorage" and "out" is not the obvious when Done https://asterix-gerrit.ics.uci.edu/#/c/615/7/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractCountAggregateFunction.java File asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractCountAggregateFunction.java: Line 54: private DataOutput out = resultStorage.getDataOutput(); > The relationship between "resultStorage" and "out" is not the obvious when Done https://asterix-gerrit.ics.uci.edu/#/c/615/7/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractMinMaxAggregateFunction.java File asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractMinMaxAggregateFunction.java: Line 48: protected DataOutput out = resultStorage.getDataOutput(); > The relationship between "resultStorage" and "out" is not the obvious when Done https://asterix-gerrit.ics.uci.edu/#/c/615/7/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractSumAggregateFunction.java File asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractSumAggregateFunction.java: Line 56: protected DataOutput out = resultStorage.getDataOutput(); > The relationship between "resultStorage" and "out" is not the obvious when Done https://asterix-gerrit.ics.uci.edu/#/c/615/7/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/stream/EmptyStreamAggregateDescriptor.java File asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/stream/EmptyStreamAggregateDescriptor.java: Line 68: private DataOutput out = resultStorage.getDataOutput(); > The relationship between "resultStorage" and "out" is not the obvious when Done https://asterix-gerrit.ics.uci.edu/#/c/615/7/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/stream/NonEmptyStreamAggregateDescriptor.java File asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/stream/NonEmptyStreamAggregateDescriptor.java: Line 67: private DataOutput out = resultStorage.getDataOutput(); > The relationship between "resultStorage" and "out" is not the obvious when Done -- To view, visit https://asterix-gerrit.ics.uci.edu/615 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: If132857cf8d707ce96951f12ba6dd86f54aa4069 Gerrit-PatchSet: 7 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Yingyi Bu Gerrit-Reviewer: Jenkins Gerrit-Reviewer: Jianfeng Jia Gerrit-Reviewer: Michael Blow Gerrit-Reviewer: Preston Carman Gerrit-Reviewer: Till Westmann Gerrit-Reviewer: Yingyi Bu Gerrit-Reviewer: abdullah alamoudi Gerrit-HasComments: Yes