Remove unused code

This commit is contained in:
Blargian 2024-04-04 12:09:31 +02:00
parent e01f1880c4
commit 46d4d459e6
3 changed files with 1 additions and 48 deletions

View File

@ -29,33 +29,6 @@ const String & FormInputFormat::columnName(size_t i) const
return getPort().getHeader().getByPosition(i).name;
}
StringRef readName(ReadBuffer & buf, StringRef & ref, String & tmp)
{
tmp.clear();
while (!buf.eof())
{
const char * next_pos = find_first_symbols<'=','&'>(buf.position(), buf.buffer().end());
if (next_pos == buf.buffer().end())
{
tmp.append(buf.position(), next_pos - buf.position());
buf.position() = buf.buffer().end();
buf.next();
continue;
}
if (*next_pos == '=')
{
ref = StringRef(buf.position(), next_pos - buf.position());
buf.position() += next_pos + 1 - buf.position();
}
return ref;
}
throw Exception(ErrorCodes::CANNOT_READ_ALL_DATA, "Unexpected end of stream while reading key name from Form format");
}
void FormInputFormat::readField(size_t index, MutableColumns & columns)
{
if (seen_columns[index])
@ -83,20 +56,6 @@ String readFieldName(ReadBuffer & buf)
return field;
}
void FormInputFormat::skipUnknownFormField(StringRef name_ref)
{
if (!format_settings.skip_unknown_fields)
throw Exception(ErrorCodes::INCORRECT_DATA, "Unknown field found while parsing Form format: {}", name_ref.toString());
/// read name and value but do nothing with them
if (!in->eof())
{
readFieldName(*in);
String value;
readStringUntilAmpersand(value,*in);
}
}
void FormInputFormat::readFormData(MutableColumns & columns)
{
size_t index = 0;

View File

@ -21,16 +21,9 @@ private:
void readPrefix() override;
bool readRow(MutableColumns & columns, RowReadExtension & ext) override;
void readFormData(MutableColumns & columns);
void readNestedFormData(const String & name, MutableColumns & columns);
void readField(size_t index, MutableColumns & columns);
void skipUnknownFormField(StringRef name_ref);
const String & columnName(size_t i) const;
String name_buf;
/// holds common prefix of nested column names
String current_column_name;
/// Hash table matches field name to position in the block
using NameMap = HashMap<StringRef, size_t, StringRefHash>;
NameMap name_map;

View File

@ -2680,6 +2680,7 @@ uptime
uptrace
uring
url
urlencoded
urlCluster
urls
usearch