| 1046 | } |
| 1047 | |
| 1048 | std::pair<ColumnsDescription, String> IStorageURLBase::getTableStructureAndFormatFromDataImpl( |
| 1049 | std::optional<String> format, |
| 1050 | const String & uri, |
| 1051 | CompressionMethod compression_method, |
| 1052 | const HTTPHeaderEntries & headers, |
| 1053 | const std::optional<FormatSettings> & format_settings, |
| 1054 | const ContextPtr & context) |
| 1055 | { |
| 1056 | context->getRemoteHostFilter().checkURL(Poco::URI(uri)); |
| 1057 | |
| 1058 | Poco::Net::HTTPBasicCredentials credentials; |
| 1059 | |
| 1060 | std::vector<String> urls_to_check; |
| 1061 | if (urlWithGlobs(uri)) |
| 1062 | urls_to_check = parseRemoteDescription(uri, 0, uri.size(), ',', context->getSettingsRef()[Setting::glob_expansion_max_elements], "url"); |
| 1063 | else |
| 1064 | urls_to_check = {uri}; |
| 1065 | |
| 1066 | ReadBufferIterator read_buffer_iterator(urls_to_check, format, compression_method, headers, format_settings, context); |
| 1067 | if (format) |
| 1068 | return {readSchemaFromFormat(*format, format_settings, read_buffer_iterator, context), *format}; |
| 1069 | return detectFormatAndReadSchema(format_settings, read_buffer_iterator, context); |
| 1070 | } |
| 1071 | |
| 1072 | ColumnsDescription IStorageURLBase::getTableStructureFromData( |
| 1073 | const String & format, |
nothing calls this directly
no test coverage detected