| 170 | } |
| 171 | |
| 172 | BlockIO HTTPDictionarySource::loadKeys(const Columns & key_columns, const VectorWithMemoryTracking<size_t> & requested_rows) |
| 173 | { |
| 174 | LOG_TRACE(log, "loadKeys {} size = {}", toString(), requested_rows.size()); |
| 175 | |
| 176 | auto block = blockForKeys(dict_struct, key_columns, requested_rows); |
| 177 | |
| 178 | ReadWriteBufferFromHTTP::OutStreamCallback out_stream_callback = [block, this](std::ostream & ostr) |
| 179 | { |
| 180 | WriteBufferFromOStream out_buffer(ostr); |
| 181 | auto output_format = context->getOutputFormatParallelIfPossible(configuration.format, out_buffer, block.cloneEmpty()); |
| 182 | formatBlock(output_format, block); |
| 183 | out_buffer.finalize(); |
| 184 | }; |
| 185 | |
| 186 | Poco::URI uri(configuration.url); |
| 187 | |
| 188 | auto buf = BuilderRWBufferFromHTTP(uri) |
| 189 | .withConnectionGroup(HTTPConnectionGroupType::STORAGE) |
| 190 | .withMethod(Poco::Net::HTTPRequest::HTTP_POST) |
| 191 | .withSettings(context->getReadSettings()) |
| 192 | .withTimeouts(timeouts) |
| 193 | .withHeaders(configuration.header_entries) |
| 194 | .withOutCallback(std::move(out_stream_callback)) |
| 195 | .withDelayInit(false) |
| 196 | .create(credentials); |
| 197 | |
| 198 | BlockIO io; |
| 199 | io.pipeline = createWrappedBuffer(std::move(buf)); |
| 200 | return io; |
| 201 | } |
| 202 | |
| 203 | bool HTTPDictionarySource::isModified() const |
| 204 | { |
nothing calls this directly
no test coverage detected