protected SqlParserPos getPos() throws ParseException { return new SqlParserPos( token.beginLine, token.beginColumn, token.endLine, token.endColumn); }
protected SqlParserPos getPos() throws ParseException { return new SqlParserPos( token.beginLine, token.beginColumn, token.endLine, token.endColumn); }
if (pex.currentToken != null) { final Token token = pex.currentToken.next; pos = new SqlParserPos( token.beginLine, token.beginColumn, int line = Integer.parseInt(matcher.group(1)); int column = Integer.parseInt(matcher.group(2)); pos = new SqlParserPos(line, column, line, column); pos = new SqlParserPos( ece.getPosLine(), ece.getPosColumn(),
SqlAggFunction createCustomAggFunction(String funcName, RelDataType returnType, Class<?> customAggFuncClz) { RelDataTypeFactory typeFactory = getCluster().getTypeFactory(); SqlIdentifier sqlIdentifier = new SqlIdentifier(funcName, new SqlParserPos(1, 1)); AggregateFunction aggFunction = AggregateFunctionImpl.create(customAggFuncClz); List<RelDataType> argTypes = new ArrayList<RelDataType>(); List<SqlTypeFamily> typeFamilies = new ArrayList<SqlTypeFamily>(); for (FunctionParameter o : aggFunction.getParameters()) { final RelDataType type = o.getType(typeFactory); argTypes.add(type); typeFamilies.add(Util.first(type.getSqlTypeName().getFamily(), SqlTypeFamily.ANY)); } return new SqlUserDefinedAggFunction(sqlIdentifier, ReturnTypes.explicit(returnType), InferTypes.explicit(argTypes), OperandTypes.family(typeFamilies), aggFunction, false, false, typeFactory); }
if (pex.currentToken != null) { final Token token = pex.currentToken.next; pos = new SqlParserPos( token.beginLine, token.beginColumn, int line = Integer.parseInt(matcher.group(1)); int column = Integer.parseInt(matcher.group(2)); pos = new SqlParserPos(line, column, line, column); pos = new SqlParserPos( ece.getPosLine(), ece.getPosColumn(),
SqlParserPos pos = new SqlParserPos(1, 1); SqlNode amt = bs.getAmt() == 0 ? null : SqlLiteral.createExactNumeric( String.valueOf(bs.getAmt()), new SqlParserPos(2, 2)); RexNode amtLiteral = null; SqlCall sc = null; rwb = RexWindowBound.create(SqlWindow.createCurrentRow(new SqlParserPos(1, 1)), null); break; rwb = RexWindowBound.create(SqlWindow.createUnboundedFollowing(new SqlParserPos(1, 1)), null); } else {
new SqlIntervalQualifier(TimeUnit.YEAR, TimeUnit.MONTH, new SqlParserPos(1,1))); break; case INTERVAL_DAY_TIME: rexBuilder.makeIntervalLiteral(secsValueBd.add(nanosValueBd), new SqlIntervalQualifier(TimeUnit.MILLISECOND, null, new SqlParserPos(1, 1))); break; case VOID:
SqlParserPos pos = new SqlParserPos(1, 1); SqlNode amt = bs.getAmt() == 0 ? null : SqlLiteral.createExactNumeric( String.valueOf(bs.getAmt()), new SqlParserPos(2, 2)); RexNode amtLiteral = null; SqlCall sc = null; rwb = RexWindowBound.create(SqlWindow.createCurrentRow(new SqlParserPos(1, 1)), null); break; rwb = RexWindowBound.create(SqlWindow.createUnboundedFollowing(new SqlParserPos(1, 1)), null); } else {
protected SqlParserPos getPos() throws ParseException {return new SqlParserPos( token.beginLine, token.beginColumn, token.endLine, token.endColumn); }
case INTERVAL_YEAR_MONTH: convertedType = dtFactory.createSqlIntervalType( new SqlIntervalQualifier(TimeUnit.YEAR, TimeUnit.MONTH, new SqlParserPos(1,1))); break; case INTERVAL_DAY_TIME: convertedType = dtFactory.createSqlIntervalType( new SqlIntervalQualifier(TimeUnit.DAY, TimeUnit.SECOND, new SqlParserPos(1,1))); break; case BINARY:
new SqlIntervalQualifier(TimeUnit.YEAR, TimeUnit.MONTH, new SqlParserPos(1,1))); break; case INTERVAL_DAY_TIME: rexBuilder.makeIntervalLiteral(secsValueBd.add(nanosValueBd), new SqlIntervalQualifier(TimeUnit.MILLISECOND, null, new SqlParserPos(1, 1))); break; case VOID:
case INTERVAL_YEAR_MONTH: convertedType = dtFactory.createSqlIntervalType( new SqlIntervalQualifier(TimeUnit.YEAR, TimeUnit.MONTH, new SqlParserPos(1,1))); break; case INTERVAL_DAY_TIME: convertedType = dtFactory.createSqlIntervalType( new SqlIntervalQualifier(TimeUnit.DAY, TimeUnit.SECOND, new SqlParserPos(1,1))); break; case BINARY:
if (pex.currentToken != null) { final Token token = pex.currentToken.next; pos = new SqlParserPos( token.beginLine, token.beginColumn, int line = Integer.parseInt(matcher.group(1)); int column = Integer.parseInt(matcher.group(2)); pos = new SqlParserPos(line, column, line, column); pos = new SqlParserPos( ece.getPosLine(), ece.getPosColumn(),
protected SqlParserPos getPos() throws ParseException { return new SqlParserPos( token.beginLine, token.beginColumn, token.endLine, token.endColumn); }
protected SqlParserPos getPos() throws ParseException { return new SqlParserPos( token.beginLine, token.beginColumn, token.endLine, token.endColumn); }
SqlParserPos getPos() throws ParseException { return new SqlParserPos( token.beginLine, token.beginColumn, token.endLine, token.endColumn); }
protected SqlParserPos getPos() throws ParseException { return new SqlParserPos( token.beginLine, token.beginColumn, token.endLine, token.endColumn); }
protected SqlParserPos getPos() throws ParseException { return new SqlParserPos( token.beginLine, token.beginColumn, token.endLine, token.endColumn); }
public List<SqlMoniker> getCompletionHints0(String sql, int cursor) { String simpleSql = simplifySql(sql, cursor); int idx = simpleSql.indexOf(HINT_TOKEN); if (idx < 0) { return Collections.emptyList(); } SqlParserPos pos = new SqlParserPos(1, idx + 1); return getCompletionHints(simpleSql, pos); }
public List<SqlMoniker> getCompletionHints0(String sql, int cursor) { String simpleSql = simplifySql(sql, cursor); int idx = simpleSql.indexOf(HINT_TOKEN); if (idx < 0) { return Collections.emptyList(); } SqlParserPos pos = new SqlParserPos(1, idx + 1); return getCompletionHints(simpleSql, pos); }