You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@metron.apache.org by "Nick Allen (JIRA)" <ji...@apache.org> on 2016/08/16 21:41:21 UTC

[jira] [Created] (METRON-373) Unable to Call Stellar Function with No Arguments

Nick Allen created METRON-373:
---------------------------------

             Summary: Unable to Call Stellar Function with No Arguments
                 Key: METRON-373
                 URL: https://issues.apache.org/jira/browse/METRON-373
             Project: Metron
          Issue Type: Bug
            Reporter: Nick Allen
            Priority: Minor


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



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