dongjoon-hyun commented on a change in pull request #716:
URL: https://github.com/apache/orc/pull/716#discussion_r650447696
##########
File path: java/core/pom.xml
##########
@@ -151,12 +160,40 @@
</configuration>
</plugin>
<plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
Review comment:
Could you add this after `build-helper-maven-plugin`?
##########
File path: java/core/src/java/org/apache/orc/impl/RecordReaderImpl.java
##########
@@ -23,7 +23,8 @@
import java.time.ZoneOffset;
import java.time.chrono.ChronoLocalDate;
import java.time.format.DateTimeFormatter;
-import org.apache.commons.lang.ArrayUtils;
+
+import org.apache.commons.lang3.ArrayUtils;
Review comment:
Just a question. Is it required? Or, can we do this first as a small PR?
##########
File path: java/core/src/java/org/apache/orc/util/CuckooSetBytes.java
##########
@@ -0,0 +1,443 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.orc.util;
+
+import org.apache.hadoop.hive.ql.exec.vector.expressions.StringExpr;
+
+import java.util.Random;
+
+/**
+ * A high-performance set implementation used to support fast set membership
testing,
+ * using Cuckoo hashing. This is used to support fast tests of the form
+ *
+ * column IN ( <list-of-values )
+ *
+ * For details on the algorithm, see R. Pagh and F. F. Rodler, "Cuckoo
Hashing,"
+ * Elsevier Science preprint, Dec. 2003.
http://www.itu.dk/people/pagh/papers/cuckoo-jour.pdf.
+ *
+ * Copied from CuckooSetBytes@Apache Hive project for convenience
Review comment:
Could you add a hyperlink here?
##########
File path: java/core/src/java/org/apache/orc/util/CuckooSetBytes.java
##########
@@ -0,0 +1,443 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.orc.util;
+
+import org.apache.hadoop.hive.ql.exec.vector.expressions.StringExpr;
+
+import java.util.Random;
+
+/**
+ * A high-performance set implementation used to support fast set membership
testing,
+ * using Cuckoo hashing. This is used to support fast tests of the form
+ *
+ * column IN ( <list-of-values )
+ *
+ * For details on the algorithm, see R. Pagh and F. F. Rodler, "Cuckoo
Hashing,"
+ * Elsevier Science preprint, Dec. 2003.
http://www.itu.dk/people/pagh/papers/cuckoo-jour.pdf.
+ *
+ * Copied from CuckooSetBytes@Apache Hive project for convenience
+ */
+public class CuckooSetBytes {
Review comment:
And, let's proceed this separately. Then, I can help you merge this
first safely.
##########
File path: java/core/src/java/org/apache/orc/util/CuckooSetBytes.java
##########
@@ -0,0 +1,443 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.orc.util;
+
+import org.apache.hadoop.hive.ql.exec.vector.expressions.StringExpr;
+
+import java.util.Random;
+
+/**
+ * A high-performance set implementation used to support fast set membership
testing,
+ * using Cuckoo hashing. This is used to support fast tests of the form
+ *
+ * column IN ( <list-of-values )
+ *
+ * For details on the algorithm, see R. Pagh and F. F. Rodler, "Cuckoo
Hashing,"
+ * Elsevier Science preprint, Dec. 2003.
http://www.itu.dk/people/pagh/papers/cuckoo-jour.pdf.
+ *
+ * Copied from CuckooSetBytes@Apache Hive project for convenience
+ */
+public class CuckooSetBytes {
Review comment:
And, let's proceed this addition separately. Then, I can help you merge
this first safely.
##########
File path: java/core/src/test/org/apache/orc/impl/TestSchemaEvolution.java
##########
@@ -763,8 +763,6 @@ public void testTimestampToDecimal64Evolution() throws
Exception {
@Test
public void testTimestampToStringEvolution() throws Exception {
- testFilePath = new Path(workDir, "TestSchemaEvolution." +
- testCaseName.getMethodName() +
".orc");
Review comment:
Is there a reason why you remove this in your new feature PR, @pavibhai ?
##########
File path: java/core/src/test/org/apache/orc/util/CuckooSetBytesTest.java
##########
@@ -0,0 +1,124 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.orc.util;
+
+import org.junit.Test;
+
+import java.nio.charset.StandardCharsets;
+import java.util.Random;
+
+import static org.junit.Assert.*;
+
+public class CuckooSetBytesTest {
Review comment:
Could you add a reference if this is copied together?
##########
File path: java/gen/src/findbugs/exclude.xml
##########
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<FindBugsFilter>
+
+</FindBugsFilter>
Review comment:
Just a question. Do we need this empty file?
##########
File path: java/gen/src/findbugs/exclude.xml
##########
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<FindBugsFilter>
+
+</FindBugsFilter>
Review comment:
Just a question. Do we need this empty exclude file?
##########
File path: java/mapreduce/src/java/org/apache/orc/mapred/OrcInputFormat.java
##########
@@ -153,8 +153,10 @@ public static void setSearchArgument(Configuration conf,
Reader file = OrcFile.createReader(split.getPath(),
OrcFile.readerOptions(conf)
.maxLength(OrcConf.MAX_FILE_LENGTH.getLong(conf)));
- return new OrcMapredRecordReader<>(file, buildOptions(conf,
- file, split.getStart(), split.getLength()));
+ //Mapreduce supports selected vector
+ Reader.Options options = buildOptions(conf, file, split.getStart(),
split.getLength())
+ .allowSelected(true);
+ return new OrcMapredRecordReader<>(file,options);
Review comment:
nit. `file,options` -> `file, options`
--
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]