deniskuzZ commented on code in PR #6747:
URL: https://github.com/apache/hive/pull/6747#discussion_r3925224177
##########
serde/src/java/org/apache/hadoop/hive/serde2/lazy/fast/LazySimpleDeserializeRead.java:
##########
@@ -432,20 +496,54 @@ private void topLevelParse() {
* Optimize the loops by pulling special end cases and global decisions
like isEscaped out!
*/
if (!isEscaped) {
- while (fieldByteEnd < end) {
- if (bytes[fieldByteEnd] == separator) {
+ if (fieldDelimMulti == null) {
Review Comment:
it's unreadable, can refactor?
The problem isn't individual lines; it's that topLevelParse() currently
contains three parsing algorithms + shared bookkeeping + sentinel handling.
##########
serde/src/java/org/apache/hadoop/hive/serde2/lazy/fast/LazySimpleDeserializeRead.java:
##########
@@ -497,7 +595,11 @@ private void topLevelParse() {
// For missing fields, their starting positions will all be the same,
// which will make their lengths to be -1 and uncheckedGetField will
// return these fields as NULLs.
- Arrays.fill(startPositions, fieldId, startPositions.length, fieldByteEnd
+ 1);
+ // Charge the actual separator width (1 byte for LazySimple, delim.length
Review Comment:
block comment was already here, so maybe disregard my pre comments about same
--
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]