You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@orc.apache.org by vg...@apache.org on 2018/12/17 17:48:06 UTC
[orc] branch branch-1.5 updated: ORC-437: Make acid schema checks
case insensitive
This is an automated email from the ASF dual-hosted git repository.
vgumashta pushed a commit to branch branch-1.5
in repository https://gitbox.apache.org/repos/asf/orc.git
The following commit(s) were added to refs/heads/branch-1.5 by this push:
new 9f529e1 ORC-437: Make acid schema checks case insensitive
9f529e1 is described below
commit 9f529e1af42497972b2b780aab210b033eb06efe
Author: Vaibhav Gumashta <vg...@hortonworks.com>
AuthorDate: Tue Nov 20 13:23:20 2018 -0800
ORC-437: Make acid schema checks case insensitive
---
java/core/src/java/org/apache/orc/impl/SchemaEvolution.java | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/java/core/src/java/org/apache/orc/impl/SchemaEvolution.java b/java/core/src/java/org/apache/orc/impl/SchemaEvolution.java
index 480f13a..aa7ba9c 100644
--- a/java/core/src/java/org/apache/orc/impl/SchemaEvolution.java
+++ b/java/core/src/java/org/apache/orc/impl/SchemaEvolution.java
@@ -584,9 +584,15 @@ public class SchemaEvolution {
private static boolean checkAcidSchema(TypeDescription type) {
if (type.getCategory().equals(TypeDescription.Category.STRUCT)) {
List<String> rootFields = type.getFieldNames();
- if (acidEventFieldNames.equals(rootFields)) {
- return true;
+ if (rootFields.size() != acidEventFieldNames.size()) {
+ return false;
+ }
+ for (int i = 0; i < rootFields.size(); i++) {
+ if (!acidEventFieldNames.get(i).equalsIgnoreCase(rootFields.get(i))) {
+ return false;
+ }
}
+ return true;
}
return false;
}