Hi David,

Thanks for your reply. Sorry that my question is not clear.  I'm still
leraning flight SQL. I implemented SpartaFlightSqlProducer and
overwrite createPreparedStatement. I'm using the following method to build
a ActionCreatePreparedStatementResult.

I don't know how do I set parameter schema and dataset schema here. Also,
when I start the flight server, I didn't configure the database schema. How
does flight server know what schema to return if client calls getSchema
method.

    val result = ActionCreatePreparedStatementResult.newBuilder
      .setPreparedStatementHandle(preparedStatementHandle)
      //TODO: Default implementations, need to look at parameter binding
for prepares statements
      .setParameterSchema(ByteString.EMPTY)
      .setDatasetSchema(ByteString.EMPTY)
      .setUnknownFields(UnknownFieldSet.getDefaultInstance)
      .build

Regards,
Dafei

On Thu, Feb 16, 2023 at 8:11 PM David Li <[email protected]> wrote:

> Hi Derek,
>
> Is this Flight RPC, or Flight SQL?
>
> Also, I assume you are talking about the metadata schema, not an Arrow
> schema, right?
>
> For Flight RPC, there is no standard.
>
> For Flight SQL, there is a proposal starting here for catalogs, which may
> work: https://lists.apache.org/thread/fd6r1n7vt91sg2c7fr35wcrsqz6x4645
>
> Any details about what specifically you're trying to accomplish would be
> helpful.
>
> -David
>
> On Thu, Feb 16, 2023, at 14:18, Derek Wang wrote:
>
> Dear Sir/Madam,
>
> I'm integrating our DB with flight service. How do I set db schema in a
> flight service?
>
> Regards,
> Derek
>
>
>

Reply via email to