@Override
    public void enterFromClause(ClickHouseParser.FromClauseContext ctx) {
        if (ctx.QUERY() != null) {
            appendParameter(ctx.QUERY().getSymbol().getStartIndex());
        }
    }
Parser listener that collects information for prepared statement.
jdbc-v2/src/main/java/com/clickhouse/jdbc/internal/ParsedPreparedStatement.java