title: When passing sql parameters to jdbcTemplate.query I get a SQLException with object args
body: <p>I'm trying to use the Calcite Avatica JDBC driver calling into a sample Druid database using a Spring Boot project.  Following along most examples I fashioned this query and it throws an exception if I pass along <code>new Object[] { cityName }</code>.  However, if I pass along <code>Object[] {}</code> I don't get that same exception.</p>
  
  <pre><code>        String cityName =  "Aachen";
          results = jdbcTemplate.query("SELECT cityName, countryName FROM wikipedia WHERE cityName = ?",
                  new Object[] { cityName },
                  (rs, rowNum) -&gt; {
                      return new City(cityName, rs.getString("countryName"));
                  }
          );
  </code></pre>
  
  <p>Here's the exception </p>
  
  <pre><code>org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [SELECT cityName, countryName FROM wikipedia WHERE cityName = ?]; SQL state [00000]; error code [-1]; Error -1 (00000) : while preparing SQL: SELECT cityName, countryName FROM wikipedia WHERE cityName = ?; nested exception is org.apache.calcite.avatica.AvaticaSqlException: Error -1 (00000) : while preparing SQL: SELECT cityName, countryName FROM wikipedia WHERE cityName = ?
  </code></pre>
  
  <p>I even get the same exception if I switch to <code>NamedParameterJdbcTemplate</code></p>
  
  <pre><code>namedParameterJdbcTemplate.query("SELECT cityName, countryName, comment FROM wikipedia WHERE cityName = :cityName",
                      new MapSqlParameterSource()
                              .addValue("cityName", "Aachen"),
                      (rs, rowNum) -&gt; {
                          return new SponsoredPostStats(sponsoredPostId, rs.getInt("views"), "");
                      }
  </code></pre>