Skip to content

Commit

Permalink
upgrade groovy to 4.x
Browse files Browse the repository at this point in the history
  • Loading branch information
924060929 committed Mar 7, 2024
1 parent e18514a commit 215f03c
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 62 deletions.
89 changes: 29 additions & 60 deletions regression-test/framework/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,7 @@ under the License.
<maven.compiler.target>1.8</maven.compiler.target>
<revision>1.0-SNAPSHOT</revision>
<project.scm.id>github</project.scm.id>
<groovy.version>3.0.7</groovy.version>
<groovy-eclipse-batch.version>3.0.7-01</groovy-eclipse-batch.version>
<groovy-eclipse-compiler.version>3.7.0</groovy-eclipse-compiler.version>
<groovy.version>4.0.19</groovy.version>
<antlr.version>4.9.3</antlr.version>
<hadoop.version>2.8.0</hadoop.version>
<arrow.version>15.0.0</arrow.version>
Expand All @@ -86,33 +84,19 @@ under the License.
<version>1.2.5</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.9.0</version>
<configuration>
<compilerId>groovy-eclipse-compiler</compilerId>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<fork>true</fork>
</configuration>
<dependencies>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-eclipse-compiler</artifactId>
<version>${groovy-eclipse-compiler.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-eclipse-batch</artifactId>
<version>${groovy-eclipse-batch.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-eclipse-compiler</artifactId>
<version>${groovy-eclipse-compiler.version}</version>
<extensions>true</extensions>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<version>3.0.2</version>
<executions>
<execution>
<goals>
<goal>addSources</goal>
<goal>addTestSources</goal>
<goal>compile</goal>
<goal>compileTests</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -168,35 +152,6 @@ under the License.
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.2.5</version>
<configuration>
<updatePomFile>true</updatePomFile>
<flattenMode>bom</flattenMode>
</configuration>
<executions>
<execution>
<id>flatten</id>
<phase>process-resources</phase>
<goals>
<goal>flatten</goal>
</goals>
</execution>
<execution>
<id>flatten.clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>

<dependencies>
Expand All @@ -212,7 +167,7 @@ under the License.
<version>2.10.1</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>${groovy.version}</version>
<type>pom</type>
Expand Down Expand Up @@ -301,11 +256,25 @@ under the License.
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-mapreduce-client-core</artifactId>
<version>${hadoop.version}</version>
<exclusions>
<!-- exclude jdk7 jar -->
<exclusion>
<groupId>jdk.tools</groupId>
<artifactId>jdk.tools</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-jdbc</artifactId>
<version>2.3.7</version>
<exclusions>
<!-- exclude jdk7 jar -->
<exclusion>
<groupId>jdk.tools</groupId>
<artifactId>jdk.tools</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.arrow</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ class SqlFileSource implements ScriptSource {
SuiteScript script = new SuiteScript() {
@Override
Object run() {
List<String> sqls = getSqls(file.text)
suite(suiteName, groupName) {
String tag = suiteName
String exceptionStr = ""
boolean order = suiteName.endsWith("_order")
List<String> sqls = getSqls(file.text)
log.info("Try to execute group: ${groupName} suite: ${suiteName} with ${sqls.size()} stmts")
for (int i = 0; i < sqls.size(); ++i) {
String singleSql = sqls.get(i)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class DataUtils {
// null first, order by column.toString asc
static List<List<Object>> sortByToString(List<List<Object>> originData) {
def comparator = Comparator.<String>naturalOrder()
originData.sort(false, { row1, row2 ->
originData.sort(false, { List<Object> row1, List<Object> row2 ->
for (int i = 0; i < row1.size(); ++i) {
Object column1 = row1[i]
Object column2 = row2[i]
Expand Down

0 comments on commit 215f03c

Please sign in to comment.