You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Taewoo Kim (JIRA)" <ji...@apache.org> on 2016/10/20 16:49:58 UTC

[jira] [Assigned] (ASTERIXDB-1700) edit-distance-check on the fields with the 2-gram and the 3-gram index generates a null pointer exception.

     [ https://issues.apache.org/jira/browse/ASTERIXDB-1700?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Taewoo Kim reassigned ASTERIXDB-1700:
-------------------------------------

    Assignee: Taewoo Kim  (was: Jianfeng Jia)

> 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)