deniskuzZ commented on code in PR #6747:
URL: https://github.com/apache/hive/pull/6747#discussion_r3925127950


##########
llap-server/src/java/org/apache/hadoop/hive/llap/io/encoded/VectorDeserializeOrcWriter.java:
##########
@@ -103,38 +105,57 @@ public static EncodingWriter create(InputFormat<?, ?> 
sourceIf, Deserializer ser
       List<Integer> sourceIncludes, boolean[] cacheIncludes, int allocSize, 
ExecutorService encodeExecutor)
       throws IOException {
     // Vector SerDe can be disabled both on client and server side.
+    // MultiDelimitSerDe is accepted alongside LazySimpleSerDe: it's the same
+    // text-row shape, only its top-level FIELD_DELIM can span multiple bytes.
+    // The reader (LazySimpleDeserializeRead) picks the multi-byte scanner
+    // when LazySerDeParameters.setFieldDelimMulti has been called below —
+    // otherwise the specialized single-byte hot loop runs unchanged.
+    final boolean isLazySimple = serDe instanceof LazySimpleSerDe;
+    final boolean isMultiDelim = serDe instanceof MultiDelimitSerDe;
     if (!HiveConf.getBoolVar(daemonConf, 
ConfVars.LLAP_IO_ENCODE_VECTOR_SERDE_ENABLED)
         || !HiveConf.getBoolVar(jobConf, 
ConfVars.LLAP_IO_ENCODE_VECTOR_SERDE_ENABLED)
-        || !(sourceIf instanceof TextInputFormat) || !(serDe instanceof 
LazySimpleSerDe)) {
+        || !(sourceIf instanceof TextInputFormat) || !(isLazySimple || 
isMultiDelim)) {
       return new DeserializerOrcWriter(serDe, sourceOi, allocSize);
     }
     Path path = splitPath.getFileSystem(jobConf).makeQualified(splitPath);
     PartitionDesc partDesc = HiveFileFormatUtils.getFromPathRecursively(parts, 
path, null);
     if (partDesc == null) {
-      LlapIoImpl.LOG.info("Not using VertorDeserializeOrcWriter: no partition 
desc for " + path);
+      LlapIoImpl.LOG.info("Not using VectorDeserializeOrcWriter: no partition 
desc for " + path);
       return new DeserializerOrcWriter(serDe, sourceOi, allocSize);
     }
     Properties tblProps = partDesc.getTableDesc().getProperties();
     if ("true".equalsIgnoreCase(tblProps.getProperty(
         serdeConstants.SERIALIZATION_LAST_COLUMN_TAKES_REST))) {
-      LlapIoImpl.LOG.info("Not using VertorDeserializeOrcWriter due to "
+      LlapIoImpl.LOG.info("Not using VectorDeserializeOrcWriter due to "
         + serdeConstants.SERIALIZATION_LAST_COLUMN_TAKES_REST);
       return new DeserializerOrcWriter(serDe, sourceOi, allocSize);
     }
+    // MultiDelimitSerDe's own row parser (LazyStruct.parseMultiDelimit) does

Review Comment:
   please use block coment



-- 
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