aturoczy commented on code in PR #6219:
URL: https://github.com/apache/hive/pull/6219#discussion_r2600274985
##########
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:
I disagree a bit. In Java we mainly use is* has*, *exists* . The
CheckIfSomethingIsSomething is to long and not express it correctly. But
IsAcidFile also not correct as the check is not about the file, but about the
existence of properties. acidRowsExists maybe?
##########
ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcRecordUpdater.java:
##########
@@ -93,12 +93,12 @@ public class OrcRecordUpdater implements RecordUpdater {
static final String CURRENT_WRITEID_FIELD_NAME = "currentTransaction";
static final String ROW_FIELD_NAME = "row";
public static final Collection<String> ALL_ACID_ROW_NAMES = Arrays.asList(
- OrcRecordUpdater.BUCKET_FIELD_NAME,
- OrcRecordUpdater.CURRENT_WRITEID_FIELD_NAME,
- OrcRecordUpdater.ORIGINAL_WRITEID_FIELD_NAME,
- OrcRecordUpdater.OPERATION_FIELD_NAME,
- OrcRecordUpdater.ROW_FIELD_NAME,
- OrcRecordUpdater.ROW_ID_FIELD_NAME);
+ OrcRecordUpdater.BUCKET_FIELD_NAME.toLowerCase(),
Review Comment:
If the OrcRecordUpdater.BUCKET_FIELD_NAME for example always need to be
lowercase, can it be handle on the Property level?
--
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]