mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
Remove unused code
This commit is contained in:
parent
e01f1880c4
commit
46d4d459e6
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -2680,6 +2680,7 @@ uptime
|
||||
uptrace
|
||||
uring
|
||||
url
|
||||
urlencoded
|
||||
urlCluster
|
||||
urls
|
||||
usearch
|
||||
|
Loading…
Reference in New Issue
Block a user