Open icholy opened 3 years ago
Use ConfigurationCompilerPlugInSingleRowFunction.FilterOptimizable.DISABLED
For reference:
String epl = "@name('schema') @public @buseventtype create schema Empty ();\n" + "create dataflow InputOutput\n" + " BeaconSource -> events{}\n" + " EventBusSink(events) {};\n" + "create variable String X = String.valueOf(1);\n" + "@name('s0') select * from Empty(localAssertNotNull(X));\n"; env.compileDeploy(epl).addListener("s0"); EPDataFlowInstance instance = env.runtime().getDataFlowService().instantiate(env.deploymentId("schema"), "InputOutput"); instance.start(); try { Thread.sleep(100); } catch (InterruptedException e) { e.printStackTrace(); } env.assertListenerInvoked("s0"); instance.cancel(); env.undeployAll();
Could however improve to detect the variable or provide an exception
If a constant is used instead of a variable, null is not passed.
@bernhardttom btw, I already have ConfigurationCompilerPlugInSingleRowFunction.ValueCache.DISABLED
set.
Variables passed to UDFs in event filters evaluate to null if the event originates from a dataflow operator.