private TableSchema getTableSchemaImpl(
            String describeQuery, String name, String originalQuery, String database, Map<String, Object> queryParams) {
        int operationTimeout = getOperationTimeout();

        QuerySettings settings = new QuerySettings().setDatabase(database);
        try (QueryResponse response = operationTimeout == 0
                ? query(describeQuery, queryParams, settings).get()
                : query(describeQuery, queryParams, settings).get(getOperationTimeout(), TimeUnit.SECONDS)) {
            return TableSchemaParser.readTSKV(response.getInputStream(), name, originalQuery, database);
        } catch (TimeoutException e) {
            throw new ClientException("Operation has likely timed out after " + getOperationTimeout() + " seconds.", e);
        } catch (ExecutionException e) {
            throw new ClientException("Failed to get table schema", e.getCause());
        } catch (ServerException e) {
            throw e;
        } catch (Exception e) {
            throw new ClientException("Failed to get table schema", e);
        }
    }
<p>Creates table schema from a query.</p>
@param sql - SQL query which schema to return
@return table schema for the query
client-v2/src/main/java/com/clickhouse/client/api/Client.java