Uploaded image for project: 'Metron (Retired)'
  1. Metron (Retired)
  2. METRON-373

Unable to Call Stellar Function with No Arguments

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Done
    • Minor
    • Resolution: Done
    • None
    • None

    Description

      Unable to call a Stellar function with no arguments. For example, when trying to run something like "STATS_INIT()" I get the following exception. It does work if I simply pass in a dummy variable like "STATS_INIT(0)".

      org.apache.metron.common.dsl.ParseException: Syntax error @ 1:11 no viable alternative at input 'STATS_INIT()'

      at org.apache.metron.common.dsl.ErrorListener.syntaxError(ErrorListener.java:34)
      at org.antlr.v4.runtime.ProxyErrorListener.syntaxError(ProxyErrorListener.java:65)
      at org.antlr.v4.runtime.Parser.notifyErrorListeners(Parser.java:558)
      at org.antlr.v4.runtime.DefaultErrorStrategy.reportNoViableAlternative(DefaultErrorStrategy.java:310)
      at org.antlr.v4.runtime.DefaultErrorStrategy.reportError(DefaultErrorStrategy.java:147)
      at org.apache.metron.common.stellar.generated.StellarParser.transformation_expr(StellarParser.java:459)
      at org.apache.metron.common.stellar.generated.StellarParser.transformation(StellarParser.java:145)
      at org.apache.metron.common.stellar.BaseStellarProcessor.parse(BaseStellarProcessor.java:52)
      at org.apache.metron.common.stellar.StellarStatisticalFunctionsTest.run(StellarStatisticalFunctionsTest.java:46)
      at org.apache.metron.common.stellar.StellarStatisticalFunctionsTest.setup(StellarStatisticalFunctionsTest.java:54)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
      at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
      at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
      at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:117)
      at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42)
      at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:253)
      at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:84)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
      at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
      Caused by: org.antlr.v4.runtime.NoViableAltException
      at org.antlr.v4.runtime.atn.ParserATNSimulator.noViableAlt(ParserATNSimulator.java:1894)
      at org.antlr.v4.runtime.atn.ParserATNSimulator.execATN(ParserATNSimulator.java:498)
      at org.antlr.v4.runtime.atn.ParserATNSimulator.adaptivePredict(ParserATNSimulator.java:424)
      at org.apache.metron.common.stellar.generated.StellarParser.transformation_expr(StellarParser.java:320)
      ... 31 more

      Attachments

        Activity

          People

            Unassigned Unassigned
            nickwallen Nick Allen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: