pavibhai commented on a change in pull request #647:
URL: https://github.com/apache/orc/pull/647#discussion_r586706934
##########
File path: java/core/src/java/org/apache/orc/impl/ParserUtils.java
##########
@@ -244,80 +250,172 @@ public static TypeDescription
parseType(ParserUtils.StringPosition source) {
private static final Pattern INTEGER_PATTERN = Pattern.compile("^[0-9]+$");
+ public static ColumnVector[] findBranchVectors(TypeDescription schema,
+ ParserUtils.StringPosition
source,
+ VectorizedRowBatch batch) {
+ List<String> names = ParserUtils.splitName(source);
+ return vectorWalker.get().find(schema, names, true, batch).vectorBranch;
+ }
+
public static TypeDescription findSubtype(TypeDescription schema,
ParserUtils.StringPosition source)
{
return findSubtype(schema, source, true);
}
- public static TypeDescription findSubtype(TypeDescription schema,
- ParserUtils.StringPosition source,
- boolean
isSchemaEvolutionCaseAware) {
- List<String> names = ParserUtils.splitName(source);
- if (names.size() == 1 && INTEGER_PATTERN.matcher(names.get(0)).matches()) {
- return schema.findSubtype(Integer.parseInt(names.get(0)));
+ private static final ThreadLocal<TypeWalker> typeWalker =
ThreadLocal.withInitial(TypeWalker::new);
Review comment:
Make sense, removed this. Given that ColumnVectors are cached, this
should not happen after the initial setup.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]