orc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omal...@apache.org
Subject [orc] branch master updated: ORC-553: Add test case to check that SchemaEvolution checkAcidSchema works well
Date Wed, 02 Oct 2019 20:41:22 GMT
This is an automated email from the ASF dual-hosted git repository.

omalley pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/orc.git


The following commit(s) were added to refs/heads/master by this push:
     new 79f7595  ORC-553: Add test case to check that SchemaEvolution checkAcidSchema works
well
79f7595 is described below

commit 79f7595e25b770f3012c4df6a69e1895b6fb4006
Author: Aron Hamvas <hamvas.aron@cloudera.com>
AuthorDate: Thu Sep 12 13:15:38 2019 +0200

    ORC-553: Add test case to check that SchemaEvolution checkAcidSchema works well
    
    Fixes: #429
    
    Signed-off-by: Owen O'Malley <omalley@apache.org>
---
 .../test/org/apache/orc/impl/TestSchemaEvolution.java   | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/java/core/src/test/org/apache/orc/impl/TestSchemaEvolution.java b/java/core/src/test/org/apache/orc/impl/TestSchemaEvolution.java
index 304ee4b..009bc67 100644
--- a/java/core/src/test/org/apache/orc/impl/TestSchemaEvolution.java
+++ b/java/core/src/test/org/apache/orc/impl/TestSchemaEvolution.java
@@ -2364,4 +2364,21 @@ public class TestSchemaEvolution {
       assertFalse(rows.nextBatch(batchTimeStamp));
     }
   }
+
+  public void testCheckAcidSchema() {
+    String ccSchema = "struct<operation:int,originalTransaction:bigint,bucket:int," +
+        "rowId:bigint,currentTransaction:bigint," +
+        "row:struct<a:int,b:int>>";
+    String lcSchema = "struct<operation:int,originaltransaction:bigint,bucket:int," +
+        "rowid:bigint,currenttransaction:bigint," +
+        "row:struct<a:int,b:int>>";
+
+    TypeDescription typeCamelCaseColumns = TypeDescription.fromString(ccSchema);
+    TypeDescription typeLowerCaseColumns = TypeDescription.fromString(lcSchema);
+    SchemaEvolution evoCc = new SchemaEvolution(typeCamelCaseColumns, null, options);
+    SchemaEvolution evoLc = new SchemaEvolution(typeLowerCaseColumns, null, options);
+
+    assertTrue("Schema (" + ccSchema +") was found to be non-acid ", evoCc.isAcid());
+    assertTrue("Schema (" + lcSchema +") was found to be non-acid ", evoLc.isAcid());
+  }
 }


Mime
View raw message