You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@parquet.apache.org by nk...@apache.org on 2019/10/25 21:43:23 UTC
[parquet-mr] branch master updated: PARQUET-1496: Update Scala to
2.12 (#693)
This is an automated email from the ASF dual-hosted git repository.
nkollar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/parquet-mr.git
The following commit(s) were added to refs/heads/master by this push:
new ca7d0e2 PARQUET-1496: Update Scala to 2.12 (#693)
ca7d0e2 is described below
commit ca7d0e26fe69ca6044e7e801c00e5b0797d1497a
Author: Fokko Driesprong <fo...@apache.org>
AuthorDate: Fri Oct 25 23:43:12 2019 +0200
PARQUET-1496: Update Scala to 2.12 (#693)
* PARQUET-1496: Update Scala to 2.12
This also includes updating Scrooge because it isn't compiled
anymore against Scala 2.10
* Fix the tests
* Revert unrelated changes
ScroogeBinaryTest.java
ThriftParquetReader.java
---
parquet-scrooge/pom.xml | 22 ++++++++++------------
parquet-scrooge/src/test/thrift/test.thrift | 14 +++++++-------
parquet-thrift/src/test/thrift/test.thrift | 2 +-
pom.xml | 5 +++--
4 files changed, 21 insertions(+), 22 deletions(-)
diff --git a/parquet-scrooge/pom.xml b/parquet-scrooge/pom.xml
index 6da3c0a..3040888 100644
--- a/parquet-scrooge/pom.xml
+++ b/parquet-scrooge/pom.xml
@@ -38,7 +38,7 @@
<url>https://conjars.org/repo</url>
</repository>
</repositories>
-
+
<dependencies>
<dependency>
<groupId>org.apache.parquet</groupId>
@@ -88,7 +88,7 @@
<dependency>
<groupId>com.twitter</groupId>
<artifactId>scrooge-core_${scala.binary.version}</artifactId>
- <version>4.7.0</version>
+ <version>${scrooge.verion}</version>
</dependency>
<dependency>
<groupId>org.apache.parquet</groupId>
@@ -193,7 +193,7 @@
<plugin>
<groupId>com.twitter</groupId>
<artifactId>scrooge-maven-plugin</artifactId>
- <version>3.17.0</version>
+ <version>${scrooge.verion}</version>
<configuration>
<outputDirectory>${project.build.directory}/generated-test-sources/scrooge</outputDirectory>
<thriftNamespaceMappings>
@@ -202,20 +202,18 @@
<to>org.apache.parquet.scrooge.test</to>
</thriftNamespaceMapping>
<thriftNamespaceMapping>
- <from>org.apache.parquet.thrift.test.compat</from>
- <to>org.apache.parquet.scrooge.test.compat</to>
+ <from>org.apache.parquet.thrift.test.compat</from>
+ <to>org.apache.parquet.scrooge.test.compat</to>
+ </thriftNamespaceMapping>
+ <thriftNamespaceMapping>
+ <from>org.apache.parquet.thrift.test.binary</from>
+ <to>org.apache.parquet.scrooge.test.binary</to>
</thriftNamespaceMapping>
</thriftNamespaceMappings>
+ <buildExtractedThrift>false</buildExtractedThrift>
</configuration>
<executions>
<execution>
- <id>thrift-sources</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>compile</goal>
- </goals>
- </execution>
- <execution>
<id>thrift-test-sources</id>
<phase>generate-test-sources</phase>
<goals>
diff --git a/parquet-scrooge/src/test/thrift/test.thrift b/parquet-scrooge/src/test/thrift/test.thrift
index 6db7dc1..a80dbd9 100644
--- a/parquet-scrooge/src/test/thrift/test.thrift
+++ b/parquet-scrooge/src/test/thrift/test.thrift
@@ -1,4 +1,4 @@
-/*
+/*
* 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
@@ -6,9 +6,9 @@
* 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
@@ -28,7 +28,7 @@ struct Name {
}
struct Address {
- 1: required string street,
+ 1: string street,
2: required string zip
}
@@ -38,7 +38,7 @@ struct AddressWithStreetWithDefaultRequirement {
}
struct Phone {
- 1: required string mobile
+ 1: string mobile
2: required string work
}
@@ -284,7 +284,7 @@ union UnionV2 {
3: ABool aNewBool
}
-struct StructWithUnionV2 {
+struct StructWithUnionV2 {
1: required string name,
2: required UnionV2 aUnion
}
@@ -295,7 +295,7 @@ struct AStructThatLooksLikeUnionV2 {
3: optional ABool aNewBool
}
-struct StructWithAStructThatLooksLikeUnionV2 {
+struct StructWithAStructThatLooksLikeUnionV2 {
1: required string name,
2: required AStructThatLooksLikeUnionV2 aNotQuiteUnion
}
diff --git a/parquet-thrift/src/test/thrift/test.thrift b/parquet-thrift/src/test/thrift/test.thrift
index d25e540..e759144 100644
--- a/parquet-thrift/src/test/thrift/test.thrift
+++ b/parquet-thrift/src/test/thrift/test.thrift
@@ -35,7 +35,7 @@ struct Address {
struct Phone {
1: string mobile
- 2: string work
+ 2: required string work
}
struct TestPerson {
diff --git a/pom.xml b/pom.xml
index daea619..b12dad0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -86,10 +86,11 @@
<previous.version>1.7.0</previous.version>
<thrift.executable>thrift</thrift.executable>
<format.thrift.executable>thrift</format.thrift.executable>
- <scala.version>2.10.6</scala.version>
+ <scala.version>2.12.8</scala.version>
<!-- scala.binary.version is used for projects that fetch dependencies that are in scala -->
- <scala.binary.version>2.10</scala.binary.version>
+ <scala.binary.version>2.12</scala.binary.version>
<scala.maven.test.skip>false</scala.maven.test.skip>
+ <scrooge.verion>19.10.0</scrooge.verion>
<pig.version>0.16.0</pig.version>
<pig.classifier>h2</pig.classifier>
<thrift-maven-plugin.version>0.10.0</thrift-maven-plugin.version>