Copilot commented on code in PR #50379:
URL: https://github.com/apache/doris/pull/50379#discussion_r2077063514


##########
be/src/vec/exec/format/file_reader/new_plain_text_line_reader.cpp:
##########
@@ -149,11 +149,22 @@ void 
EncloseCsvLineReaderContext::_on_pre_match_enclose(const uint8_t* start, si
                 _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;
-                return;
+            } else if (_quote_escape) {

Review Comment:
   Consider adding a comment clarifying the intended control flow when 
_quote_escape is true, especially regarding whether _idx should be incremented 
after forwarding the state.



##########
be/src/vec/exec/format/csv/csv_reader.cpp:
##########
@@ -615,18 +544,17 @@ Status CsvReader::_create_decompressor() {
     return Status::OK();
 }
 
-template <bool from_json>
 Status CsvReader::deserialize_nullable_string(IColumn& column, Slice& slice) {
     auto& null_column = assert_cast<ColumnNullable&>(column);

Review Comment:
   Please add a comment to explain the change in condition for null handling, 
clarifying why the null_len check is now used instead of the previous from_json 
parameter.
   ```suggestion
       auto& null_column = assert_cast<ColumnNullable&>(column);
       // Check if the slice matches the null format. The `_options.null_len` 
is used to determine
       // whether a null format is defined, replacing the previous `from_json` 
parameter. This approach
       // ensures compatibility with the current implementation, where null 
handling depends on the
       // length of the null format and whether the slice has been converted 
from a string.
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to