Sounds like a bug. Can you log a JIRA case. 

Julian

> On Jun 24, 2022, at 04:55, [email protected] wrote:
> 
> when you exe a sql by JdbcTemplate.exe("select * from xx.xx where 
> column='?'","filter_value")  with acatica jdbc remote driver, the client will 
> get a empty result
> 
> But if you exe the sql at the Server-Context,it will be ok!
> 
> and debug the process,the jdbc.CalciteMetaImpl will process the 
> prepareStatement like
> 
> @Override public ExecuteResult execute(StatementHandle h,
>     List<TypedValue> parameterValues, int maxRowsInFirstFrame)
>     throws NoSuchStatementException {
>   final CalciteConnectionImpl calciteConnection = getConnection();
>   CalciteServerStatement stmt = calciteConnection.server.getStatement(h);
>   final Signature signature = requireNonNull(stmt.getSignature(),
>       () -> "stmt.getSignature() is null for " + stmt);
> 
>   MetaResultSet metaResultSet;
>   if (signature.statementType.canUpdate()) {
>     final Iterable<Object> iterable =
>         _createIterable(h, signature, parameterValues, null);
>     final Iterator<Object> iterator = iterable.iterator();
>     stmt.setResultSet(iterator);
>     metaResultSet = MetaResultSet.count(h.connectionId, h.id,
>         ((Number) iterator.next()).intValue());
>   } else {
>     // Don't populate the first frame.
>     // It's not worth saving a round-trip, since we're local.
>     final Meta.Frame frame =
>         new Meta.Frame(0, false, Collections.emptyList());
>     metaResultSet =
>         MetaResultSet.create(h.connectionId, h.id, false, signature, frame);
>   }
> 
>   return new ExecuteResult(ImmutableList.of(metaResultSet));
> }
> 
> 
> MetaResultSet.create(xxx,frame),the frame is empty,it looks just werid..
> 
> 
> 

Reply via email to