asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ASTERIXDB-1700) edit-distance-check on the fields with the 2-gram and the 3-gram index generates a null pointer exception.
Date Fri, 21 Oct 2016 03:46:58 GMT

    [ https://issues.apache.org/jira/browse/ASTERIXDB-1700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15593861#comment-15593861
] 

ASF subversion and git services commented on ASTERIXDB-1700:
------------------------------------------------------------

Commit 68c8e9befabfa7def67ce3a1cc93dba05966bd15 in asterixdb's branch refs/heads/master from
[~wangsaeu]
[ https://git-wip-us.apache.org/repos/asf?p=asterixdb.git;h=68c8e9b ]

ASTERIXDB-1700: fixed multiple same type of index application error on the same field

 - Fixed an issue that multiple same type of indexes can be applied for the same field.
   For this situation, applying only one index will be enough.
   (e.g., 2-gram and 3-gram index on the same field)

Change-Id: I450f3adb20c777d5b9a8f638e010076b9d817942
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1307
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Jianfeng Jia <jianfeng.jia@gmail.com>


> edit-distance-check on the fields with the 2-gram and the 3-gram index generates a null
pointer exception.
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: ASTERIXDB-1700
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-1700
>             Project: Apache AsterixDB
>          Issue Type: Bug
>            Reporter: Taewoo Kim
>            Assignee: Taewoo Kim
>
> If there multiple indexes on the same field, we use intersect operator to integrate the
result from each index. In the following AQL query, we have two n-gram indexes on the same
field. And, the null pointer exception happens.
> {code}
> java.lang.NullPointerException
> 	at org.apache.hyracks.api.job.JobSpecification.getInputConnectorDescriptor(JobSpecification.java:192)
> 	at org.apache.hyracks.api.job.JobSpecification.getInputConnectorDescriptor(JobSpecification.java:188)
> 	at org.apache.hyracks.api.client.impl.JobActivityGraphBuilder.addSourceEdge(JobActivityGraphBuilder.java:81)
> 	at org.apache.hyracks.dataflow.std.base.AbstractSingleActivityOperatorDescriptor.contributeActivities(AbstractSingleActivityOperatorDescriptor.java:54)
> 	at org.apache.hyracks.api.client.impl.JobSpecificationActivityClusterGraphGeneratorFactory$2.visit(JobSpecificationActivityClusterGraphGeneratorFactory.java:67)
> 	at org.apache.hyracks.api.client.impl.PlanUtils.visitOperator(PlanUtils.java:41)
> 	at org.apache.hyracks.api.client.impl.PlanUtils.visit(PlanUtils.java:34)
> 	at org.apache.hyracks.api.client.impl.JobSpecificationActivityClusterGraphGeneratorFactory.createActivityClusterGraphGenerator(JobSpecificationActivityClusterGraphGeneratorFactory.java:64)
> 	at org.apache.hyracks.control.cc.work.JobStartWork.doRun(JobStartWork.java:61)
> 	at org.apache.hyracks.control.common.work.SynchronizableWork.run(SynchronizableWork.java:39)
> 	at org.apache.hyracks.control.common.work.WorkQueue$WorkerThread.run(WorkQueue.java:127)
> Oct 19, 2016 7:10:22 PM org.apache.asterix.app.translator.QueryTranslator handleQuery
> {code}
> {code}
> create type DBLPType as closed {
>   id: int64,
>   dblpid: string,
>   title: string,
>   authors: string,
>   misc: string
> }
> create dataset DBLP(DBLPType)
>   primary key id on group1;
> create index ngram2_index on DBLP(authors) type ngram(2);
> create index ngram3_index on DBLP(authors) type ngram(3);
> for $o in dataset('DBLP')
> let $ed := edit-distance-check($o.authors, "Amihay Motro", 1)
> where $ed[0]
> return $o
> {code}
> {code}
> -- DISTRIBUTE_RESULT  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
>     select (function-call: asterix:get-item, Args:[function-call: asterix:edit-distance-check,
Args:[function-call: asterix:field-access-by-index, Args:[%0->$$0, AInt32: {3}], AString:
{Amihay Motro}, AInt64: {1}], AInt64: {0}])
>     -- STREAM_SELECT  |PARTITIONED|
>       project ([$$0])
>       -- STREAM_PROJECT  |PARTITIONED|
>         exchange
>         -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
>           unnest-map [$$6, $$0] <- function-call: asterix:index-search, Args:[AString:
{DBLP}, AInt32: {0}, AString: {test}, AString: {DBLP}, ABoolean: {false}, ABoolean: {false},
AInt32: {1}, %0->$$9, AInt32: {1}, %0->$$9, TRUE, TRUE, TRUE]
>           -- BTREE_SEARCH  |PARTITIONED|
>             exchange
>             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
>               intersect ([$$9] <- [[$$9], [$$11]])
>               -- INTERSECT  |PARTITIONED|
>                 exchange
>                 -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
>                   order (ASC, %0->$$9) 
>                   -- STABLE_SORT [$$9(ASC)]  |PARTITIONED|
>                     exchange
>                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
>                       unnest-map [$$9] <- function-call: asterix:index-search, Args:[AString:
{ngram2_index}, AInt32: {5}, AString: {test}, AString: {DBLP}, ABoolean: {false}, ABoolean:
{false}, AInt32: {2}, AInt64: {1}, AInt32: {12}, AInt32: {1}, %0->$$8]
>                       -- LENGTH_PARTITIONED_INVERTED_INDEX_SEARCH  |PARTITIONED|
>                         project ([$$8])
>                         -- STREAM_PROJECT  |PARTITIONED|
>                           assign [$$8] <- [%0->$$10]
>                           -- ASSIGN  |PARTITIONED|
>                             exchange
>                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
>                               replicate
>                               -- REPLICATE  |PARTITIONED|
>                                 exchange
>                                 -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
>                                   assign [$$10] <- [AString: {Amihay Motro}]
>                                   -- ASSIGN  |PARTITIONED|
>                                     empty-tuple-source
>                                     -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
>                 exchange
>                 -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
>                   order (ASC, %0->$$11) 
>                   -- STABLE_SORT [$$11(ASC)]  |PARTITIONED|
>                     exchange
>                     -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
>                       unnest-map [$$11] <- function-call: asterix:index-search, Args:[AString:
{ngram3_index}, AInt32: {5}, AString: {test}, AString: {DBLP}, ABoolean: {false}, ABoolean:
{false}, AInt32: {2}, AInt64: {1}, AInt32: {12}, AInt32: {1}, %0->$$10]
>                       -- LENGTH_PARTITIONED_INVERTED_INDEX_SEARCH  |PARTITIONED|
>                         exchange
>                         -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
>                           replicate
>                           -- REPLICATE  |PARTITIONED|
>                             exchange
>                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
>                               assign [$$10] <- [AString: {Amihay Motro}]
>                               -- ASSIGN  |PARTITIONED|
>                                 empty-tuple-source
>                                 -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message