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 9AB23200B50 for ; Fri, 15 Jul 2016 02:24:49 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 9926E160A85; Fri, 15 Jul 2016 00:24:49 +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 DFF99160A63 for ; Fri, 15 Jul 2016 02:24:48 +0200 (CEST) Received: (qmail 79941 invoked by uid 500); 15 Jul 2016 00:24:48 -0000 Mailing-List: contact notifications-help@asterixdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@asterixdb.apache.org Delivered-To: mailing list notifications@asterixdb.apache.org Received: (qmail 79931 invoked by uid 99); 15 Jul 2016 00:24:48 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Jul 2016 00:24:48 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 8C0431A08BF for ; Fri, 15 Jul 2016 00:24:47 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.919 X-Spam-Level: X-Spam-Status: No, score=0.919 tagged_above=-999 required=6.31 tests=[SPF_FAIL=0.919] autolearn=disabled Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id l1VYU810WDmH for ; Fri, 15 Jul 2016 00:24:45 +0000 (UTC) Received: from unhygienix.ics.uci.edu (unhygienix.ics.uci.edu [128.195.14.130]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTP id C96F55FE20 for ; Fri, 15 Jul 2016 00:24:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by unhygienix.ics.uci.edu (Postfix) with ESMTP id 36ACB241DDE; Thu, 14 Jul 2016 17:24:43 -0700 (PDT) Date: Thu, 14 Jul 2016 17:24:43 -0700 From: "Yingyi Bu (Code Review)" To: abdullah alamoudi CC: Till Westmann , Jenkins Reply-To: buyingyi@gmail.com X-Gerrit-MessageType: comment Subject: Change in asterixdb[master]: Cast Record Before Insert for Open Indexes X-Gerrit-Change-Id: I0eef5813ddbfe1b9c518cd7f92d37c95e8486914 X-Gerrit-ChangeURL: X-Gerrit-Commit: 3029a918ec8f65ca85b33f7831d1513706602e3f 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: <20160715002443.36ACB241DDE@unhygienix.ics.uci.edu> archived-at: Fri, 15 Jul 2016 00:24:49 -0000 Yingyi Bu has posted comments on this change. Change subject: Cast Record Before Insert for Open Indexes ...................................................................... Patch Set 1: (5 comments) 1. I do not understand why the change must be in InlineVariableRule? Could we have a separate rule to perform this? Now InlineVariableRule becomes a bit harder to understand/read. 2. I prefer to use error code instead of new Exception types to deal with mismatched input records. Detailed comments are inlined. https://asterix-gerrit.ics.uci.edu/#/c/997/1/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/feed/dataflow/FeedExceptionHandler.java File asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/feed/dataflow/FeedExceptionHandler.java: Line 52: public ByteBuffer handle(HyracksDataException th, ByteBuffer frame) { Can we use an integer error code instead of a new Exception type to handle this? https://asterix-gerrit.ics.uci.edu/#/c/997/1/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/cast/ARecordCaster.java File asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/cast/ARecordCaster.java: Line 236: "Open field type " + inputTypeTag + " can't be promoted to type " + requiredTypeTag); "Open field"-> "Field", the input field could be in the closed part. I prefer to use HyracksDataException here with an error code, instead of a using a new Exception type. https://asterix-gerrit.ics.uci.edu/#/c/997/1/hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/InlineVariablesRule.java File hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/InlineVariablesRule.java: Line 241: if (hasInsert && InlineVariablesRule.opIsPostInsert(op)) { remove "InlineVariablesRule." Line 299: return false; This doesn't seem right. In that case, we missed the case the operator is a join. https://asterix-gerrit.ics.uci.edu/#/c/997/1/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/AssignRuntimeFactory.java File hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/AssignRuntimeFactory.java: Line 184: throw new FrameDataException(t, hde); Why any exceptions during assign x:= expr becomes a FormatDataException? Mismatched records could only be one case of many possible cases. -- To view, visit https://asterix-gerrit.ics.uci.edu/997 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0eef5813ddbfe1b9c518cd7f92d37c95e8486914 Gerrit-PatchSet: 1 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: abdullah alamoudi Gerrit-Reviewer: Jenkins Gerrit-Reviewer: Till Westmann Gerrit-Reviewer: Yingyi Bu Gerrit-Reviewer: abdullah alamoudi Gerrit-HasComments: Yes