asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yingyi Bu (Code Review)" <do-not-re...@asterixdb.incubator.apache.org>
Subject Change in asterixdb[master]: Cast Record Before Insert for Open Indexes
Date Fri, 15 Jul 2016 00:24:43 GMT
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 <bamousaa@gmail.com>
Gerrit-Reviewer: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <tillw@apache.org>
Gerrit-Reviewer: Yingyi Bu <buyingyi@gmail.com>
Gerrit-Reviewer: abdullah alamoudi <bamousaa@gmail.com>
Gerrit-HasComments: Yes

Mime
View raw message