Uploaded image for project: 'Apache AsterixDB'
  1. Apache AsterixDB
  2. ASTERIXDB-2124

Feed fails to start when filter and index both exist on one field

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      The following gives an internal error, but works successfully when either the index or the filter are removed from the DDLs:

      drop dataverse channels if exists;
      create dataverse channels;
      use dataverse channels;

      create type UserLocation as closed {
      recordId: integer,
      location: circle,
      userName: string,
      timeStamp: datetime
      };
      create dataset UserLocations(UserLocation)
      primary key recordId with filter on timeStamp;
      create index time2 on UserLocations(timeStamp);
      create feed LocationFeed using socket_adapter
      (
      ("sockets"="127.0.0.1:10009"),
      ("address-type"="IP"),
      ("type-name"="UserLocation"),
      ("upsert-feed"="true"),
      ("format"="adm")
      );
      connect feed LocationFeed to dataset UserLocations;
      start feed LocationFeed;

      StackTrace:
      SEVERE: java.lang.NullPointerException
      org.apache.hyracks.api.exceptions.HyracksDataException: java.lang.NullPointerException
      at org.apache.hyracks.api.exceptions.HyracksDataException.create(HyracksDataException.java:47)
      at org.apache.asterix.app.active.FeedEventsListener.doStart(FeedEventsListener.java:110)
      at org.apache.asterix.app.active.ActiveEntityEventsListener.start(ActiveEntityEventsListener.java:374)
      at org.apache.asterix.app.translator.QueryTranslator.handleStartFeedStatement(QueryTranslator.java:2120)
      at org.apache.asterix.app.translator.QueryTranslator.compileAndExecute(QueryTranslator.java:367)
      at org.apache.asterix.api.http.server.RestApiServlet.doHandle(RestApiServlet.java:209)
      at org.apache.asterix.api.http.server.RestApiServlet.getOrPost(RestApiServlet.java:177)
      at org.apache.asterix.api.http.server.RestApiServlet.get(RestApiServlet.java:161)
      at org.apache.hyracks.http.server.AbstractServlet.handle(AbstractServlet.java:86)
      at org.apache.hyracks.http.server.HttpRequestHandler.handle(HttpRequestHandler.java:70)
      at org.apache.hyracks.http.server.HttpRequestHandler.call(HttpRequestHandler.java:55)
      at org.apache.hyracks.http.server.HttpRequestHandler.call(HttpRequestHandler.java:36)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.NullPointerException
      at org.apache.hyracks.algebricks.core.algebra.expressions.VariableReferenceExpression.hashCode(VariableReferenceExpression.java:86)
      at java.util.HashMap.hash(HashMap.java:338)
      at java.util.HashMap.get(HashMap.java:556)
      at org.apache.hyracks.algebricks.rewriter.rules.ExtractCommonExpressionsRule$CommonExpressionSubstitutionVisitor.transform(ExtractCommonExpressionsRule.java:241)
      at org.apache.hyracks.algebricks.core.algebra.operators.logical.IndexInsertDeleteUpsertOperator.acceptExpressionTransform(IndexInsertDeleteUpsertOperator.java:106)
      at org.apache.hyracks.algebricks.rewriter.rules.ExtractCommonExpressionsRule.removeCommonExpressions(ExtractCommonExpressionsRule.java:176)
      at org.apache.hyracks.algebricks.rewriter.rules.ExtractCommonExpressionsRule.removeCommonExpressions(ExtractCommonExpressionsRule.java:144)
      at org.apache.hyracks.algebricks.rewriter.rules.ExtractCommonExpressionsRule.removeCommonExpressions(ExtractCommonExpressionsRule.java:144)
      at org.apache.hyracks.algebricks.rewriter.rules.ExtractCommonExpressionsRule.removeCommonExpressions(ExtractCommonExpressionsRule.java:144)
      at org.apache.hyracks.algebricks.rewriter.rules.ExtractCommonExpressionsRule.removeCommonExpressions(ExtractCommonExpressionsRule.java:144)
      at org.apache.hyracks.algebricks.rewriter.rules.ExtractCommonExpressionsRule.rewritePre(ExtractCommonExpressionsRule.java:117)
      at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:91)
      at org.apache.hyracks.algebricks.compiler.rewriter.rulecontrollers.SequentialFixpointRuleController.rewriteWithRuleCollection(SequentialFixpointRuleController.java:53)
      at org.apache.hyracks.algebricks.core.rewriter.base.HeuristicOptimizer.runOptimizationSets(HeuristicOptimizer.java:102)
      at org.apache.hyracks.algebricks.core.rewriter.base.HeuristicOptimizer.optimize(HeuristicOptimizer.java:82)
      at org.apache.hyracks.algebricks.compiler.api.HeuristicCompilerFactoryBuilder$1$1.optimize(HeuristicCompilerFactoryBuilder.java:90)
      at org.apache.asterix.api.common.APIFramework.compileQuery(APIFramework.java:267)
      at org.apache.asterix.app.translator.QueryTranslator.rewriteCompileQuery(QueryTranslator.java:1869)
      at org.apache.asterix.utils.FeedOperations.getConnectionJob(FeedOperations.java:180)
      at org.apache.asterix.utils.FeedOperations.buildStartFeedJob(FeedOperations.java:377)
      at org.apache.asterix.app.active.FeedEventsListener.doStart(FeedEventsListener.java:88)
      ... 14 more

        Attachments

          Activity

            People

            • Assignee:
              idleft Xikui Wang
              Reporter:
              sjaco002 Steven Jacobs
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: