Revert "[fix](csv-reader) fix column split error when there is escape character (#34364)"
This reverts commit 971e10a9db782c9986b20e1209468e4d7aeedf71.
This commit is contained in:
@ -143,12 +143,13 @@ void EncloseCsvLineReaderContext::_on_normal(const uint8_t* start, size_t& len)
|
||||
}
|
||||
|
||||
void EncloseCsvLineReaderContext::_on_pre_match_enclose(const uint8_t* start, size_t& len) {
|
||||
bool should_escape = false;
|
||||
do {
|
||||
do {
|
||||
if (start[_idx] == _escape) [[unlikely]] {
|
||||
_should_escape = !_should_escape;
|
||||
} else if (_should_escape) [[unlikely]] {
|
||||
_should_escape = false;
|
||||
should_escape = !should_escape;
|
||||
} else if (should_escape) [[unlikely]] {
|
||||
should_escape = false;
|
||||
} else if (start[_idx] == _enclose) [[unlikely]] {
|
||||
_state.forward_to(ReaderState::MATCH_ENCLOSE);
|
||||
++_idx;
|
||||
|
||||
@ -135,7 +135,6 @@ public:
|
||||
|
||||
inline void refresh_impl() {
|
||||
_idx = 0;
|
||||
_should_escape = false;
|
||||
_result = nullptr;
|
||||
_column_sep_positions.clear();
|
||||
_state.reset();
|
||||
@ -169,7 +168,6 @@ private:
|
||||
const size_t _column_sep_len;
|
||||
|
||||
size_t _idx = 0;
|
||||
bool _should_escape = false;
|
||||
|
||||
const std::string _column_sep;
|
||||
std::vector<size_t> _column_sep_positions;
|
||||
|
||||
Reference in New Issue
Block a user