use of com.hazelcast.jet.sql.impl.validate.param.StrictParameterConverter in project hazelcast by hazelcast.
the class OptimizerTestSupport method context.
private static OptimizerContext context(HazelcastSchema schema, QueryDataType... parameterTypes) {
OptimizerContext context = OptimizerContext.create(HazelcastSchemaUtils.createCatalog(schema), QueryUtils.prepareSearchPaths(null, null), emptyList(), 1, name -> null);
ParameterConverter[] parameterConverters = IntStream.range(0, parameterTypes.length).mapToObj(i -> new StrictParameterConverter(i, SqlParserPos.ZERO, parameterTypes[i])).toArray(ParameterConverter[]::new);
QueryParameterMetadata parameterMetadata = new QueryParameterMetadata(parameterConverters);
context.setParameterMetadata(parameterMetadata);
return context;
}
Aggregations