InvisibleProgrammer commented on code in PR #6219:
URL: https://github.com/apache/hive/pull/6219#discussion_r2601677150
##########
ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcInputFormat.java:
##########
@@ -389,21 +388,15 @@ public static boolean isOriginal(Reader file) {
* @return <code>false</code> if an ACID file, <code>true</code> if a simple
orc file
*/
public static boolean isOriginal(Footer footer) {
- return
!checkIfAcidRowNamesFilled(footer.getTypesList().getFirst().getFieldNamesList());
+ return !isAcidFile(footer.getTypesList().getFirst().getFieldNamesList());
}
- private static boolean checkIfAcidRowNamesFilled(Collection<String>
fieldNames) {
- return
CollectionUtils.isEqualCollection(OrcRecordUpdater.ALL_ACID_ROW_NAMES,
fieldNames, new Equator<>() {
- @Override
- public boolean equate(String s, String t1) {
- return s.equalsIgnoreCase(t1);
- }
+ private static boolean isAcidFile(Collection<String> fieldNames) {
Review Comment:
It is really hard to make a decision about the best method name.
Originally, it was `isOriginal` that to me, made no sense:
https://github.com/apache/hive/pull/6203/files#diff-2e04988b557e6dc7f50f8610a1e62103dee522560c88e94d6154d690ee516432L380
The reason why I renamed `checkIfAcidRowNamesFilled` is because I think it
was a definitely wrong name choice - it is too complex. I choosed `isAcidFile`
because an ORC file is ACID only if all those metadata fields are filled.
--
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]