Java Code Examples for org.apache.calcite.sql.type.ReturnTypes#BOOLEAN
The following examples show how to use
org.apache.calcite.sql.type.ReturnTypes#BOOLEAN .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RexProgramTest.java From calcite with Apache License 2.0 | 6 votes |
@Test void testIsDeterministic() { SqlOperator ndc = new SqlSpecialOperator( "NDC", SqlKind.OTHER_FUNCTION, 0, false, ReturnTypes.BOOLEAN, null, null) { @Override public boolean isDeterministic() { return false; } }; RexNode n = rexBuilder.makeCall(ndc); assertFalse(RexUtil.isDeterministic(n)); assertEquals(0, RexUtil.retainDeterministic(RelOptUtil.conjunctions(n)).size()); }
Example 2
Source File: RexProgramTest.java From calcite with Apache License 2.0 | 6 votes |
@Test void testSimplifyNonDeterministicFunction() { final SqlOperator ndc = new SqlSpecialOperator( "NDC", SqlKind.OTHER_FUNCTION, 0, false, ReturnTypes.BOOLEAN, null, null) { @Override public boolean isDeterministic() { return false; } }; final RexNode call1 = rexBuilder.makeCall(ndc); final RexNode call2 = rexBuilder.makeCall(ndc); final RexNode expr = eq(call1, call2); checkSimplifyUnchanged(expr); }
Example 3
Source File: SqlThrowOperator.java From Bats with Apache License 2.0 | 5 votes |
public SqlThrowOperator() { super( "$throw", SqlKind.OTHER, 2, true, ReturnTypes.BOOLEAN, null, OperandTypes.CHARACTER); }
Example 4
Source File: SqlThrowOperator.java From calcite with Apache License 2.0 | 5 votes |
public SqlThrowOperator() { super( "$throw", SqlKind.OTHER, 2, true, ReturnTypes.BOOLEAN, null, OperandTypes.CHARACTER); }