Search in sources :

Example 1 with Parameter

use of io.prestosql.sql.tree.Parameter in project hetu-core by openlookeng.

the class AstBuilder method visitParameter.

@Override
public Node visitParameter(SqlBaseParser.ParameterContext context) {
    Parameter parameter = new Parameter(getLocation(context), parameterPosition);
    parameterPosition++;
    return parameter;
}
Also used : Parameter(io.prestosql.sql.tree.Parameter)

Example 2 with Parameter

use of io.prestosql.sql.tree.Parameter in project hetu-core by openlookeng.

the class HiveAstBuilder method visitParameter.

@Override
public Node visitParameter(HiveSqlParser.ParameterContext context) {
    Parameter parameter = new Parameter(getLocation(context), parameterPosition);
    parameterPosition++;
    return parameter;
}
Also used : Parameter(io.prestosql.sql.tree.Parameter)

Example 3 with Parameter

use of io.prestosql.sql.tree.Parameter in project hetu-core by openlookeng.

the class ImpalaAstBuilder method visitParameter.

@Override
public Node visitParameter(ImpalaSqlParser.ParameterContext context) {
    Parameter parameter = new Parameter(getLocation(context), parameterPosition);
    parameterPosition++;
    return parameter;
}
Also used : Parameter(io.prestosql.sql.tree.Parameter)

Example 4 with Parameter

use of io.prestosql.sql.tree.Parameter in project hetu-core by openlookeng.

the class TestSetSessionTask method testSetSessionWithParameters.

@Test
public void testSetSessionWithParameters() {
    FunctionCall functionCall = new FunctionCallBuilder(metadata).setName(QualifiedName.of("concat")).addArgument(VARCHAR, new StringLiteral("ban")).addArgument(VARCHAR, new Parameter(0)).build();
    testSetSessionWithParameters("bar", functionCall, "banana", ImmutableList.of(new StringLiteral("ana")));
}
Also used : StringLiteral(io.prestosql.sql.tree.StringLiteral) Parameter(io.prestosql.sql.tree.Parameter) FunctionCall(io.prestosql.sql.tree.FunctionCall) FunctionCallBuilder(io.prestosql.sql.planner.FunctionCallBuilder) Test(org.testng.annotations.Test)

Aggregations

Parameter (io.prestosql.sql.tree.Parameter)4 FunctionCallBuilder (io.prestosql.sql.planner.FunctionCallBuilder)1 FunctionCall (io.prestosql.sql.tree.FunctionCall)1 StringLiteral (io.prestosql.sql.tree.StringLiteral)1 Test (org.testng.annotations.Test)1