Open Seredenko-V opened 2 months ago
Hi @Seredenko-V ! This looks like a half-baked PR, could you please create one, so it would be much easier to reason about without trying to piece everything together manually?
@Enmk, thank you for answering) The whole solution is there
Hello I try to work with scalar data by analogy with the ClickHouse repository. To do this, I made a patch in which I supplemented the list of package types from the client with the value
ClientCodes::Scalar
. The number of this value is the same as theServerCodes::Totals
, as it was in the ClickHouse repository.I also added a
bool is_scalar
parameter to theClient::Impl::SendData
to determine the type of record: scalar or dataand added
const std::map<std::string, Block>& blocks
to theClient::Execute
for working with temp tables and scalarsHere is an example of using working with a scalar
As a result of executing this query, I expect a block with a single Float64 value, but when running this example, an exception is thrown with the text
DB::Exception: Unknown expression identifier '$1' in scope SELECT '$1' AS test
. Tell me please how to work with scalar?