Skip to content

Commit

Permalink
chore: bump Eclipse platform to 2023-09, Java 17, Calcite 1.36.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vlsi committed Nov 13, 2023
1 parent feed297 commit e3f6c7f
Show file tree
Hide file tree
Showing 12 changed files with 118 additions and 65 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
build-test:
strategy:
matrix:
java: [ 8 ]
java: [ 17 ]
os: [ ubuntu-latest, windows-latest ]
name: 'Test, ${{ matrix.os }}, java ${{ matrix.java }}'
runs-on: ${{ matrix.os }}
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
## [Unreleased]

### Changed
- Eclipse Memory Analyzer 1.14.0 or higher is required
- Java 17 is required
- Update Apache Calcite to 1.36.0 (see https://calcite.apache.org/news/2023/11/10/release-1.36.0/)
- Update Guava to 32.1.3-jre
- Update net.minidev:accessors-smart to 2.5.0
- Update net.minidev:json-smart to 2.5.0

## [1.5.0] - 2020-10-12
### Added
- Extra property for all objects: `@class` (references to `java.lang.Class`)
Expand Down
14 changes: 12 additions & 2 deletions MatCalciteDependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,25 @@
<packaging>bundle</packaging>

<dependencies>
<dependency>
<groupId>net.minidev</groupId>
<artifactId>accessors-smart</artifactId>
<version>2.5.0</version>
</dependency>
<dependency>
<groupId>net.minidev</groupId>
<artifactId>json-smart</artifactId>
<version>2.5.0</version>
</dependency>
<dependency>
<groupId>org.apache.calcite</groupId>
<artifactId>calcite-core</artifactId>
<version>1.26.0</version>
<version>1.36.0</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>32.0.0-jre</version>
<version>32.1.3-jre</version>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
Expand Down
2 changes: 1 addition & 1 deletion MatCalcitePlugin/.classpath
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
Expand Down
6 changes: 3 additions & 3 deletions MatCalcitePlugin/.settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.compiler.source=17
6 changes: 3 additions & 3 deletions MatCalcitePlugin/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ Bundle-Name: MatCalcitePlugin
Bundle-SymbolicName: MatCalcitePlugin;singleton:=true
Bundle-Version: 1.6.0.qualifier
Bundle-Vendor: Vladimir Sitnikov
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.eclipse.mat.api;bundle-version="1.8.0",
org.eclipse.mat.ui;bundle-version="1.8.0",
Bundle-RequiredExecutionEnvironment: JavaSE-17
Require-Bundle: org.eclipse.mat.api;bundle-version="1.14.0",
org.eclipse.mat.ui;bundle-version="1.14.0",
org.eclipse.ui;bundle-version="3.6.0",
org.eclipse.core.runtime;bundle-version="3.7.0",
org.eclipse.jface.text;bundle-version="3.7.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
package com.github.vlsi.mat.calcite.rules;

import org.apache.calcite.plan.RelOptRule;
import org.apache.calcite.plan.RelRule;
import org.apache.calcite.rel.core.RelFactories;
import org.apache.calcite.tools.RelBuilderFactory;

public class DefaultRuleConfig implements RelRule.Config {
public static final RelRule.Config EMPTY =
new DefaultRuleConfig(RelFactories.LOGICAL_BUILDER, null, null);

protected final RelBuilderFactory relBuilderFactory;
protected final String description;
protected final RelRule.OperandTransform operandTransform;

protected DefaultRuleConfig(RelBuilderFactory relBuilderFactory, String description, RelRule.OperandTransform operandTransform) {
this.relBuilderFactory = relBuilderFactory;
this.description = description;
this.operandTransform = operandTransform;
}

@Override
public RelRule.Config withRelBuilderFactory(RelBuilderFactory relBuilderFactory) {
return new DefaultRuleConfig(relBuilderFactory, description, operandTransform);
}

@Override
public String description() {
return description;
}

@Override
public RelBuilderFactory relBuilderFactory() {
return relBuilderFactory;
}

@Override
public RelRule.Config withDescription(@org.checkerframework.checker.nullness.qual.Nullable String description) {
return new DefaultRuleConfig(relBuilderFactory, description, operandTransform);
}

@Override
public RelRule.OperandTransform operandSupplier() {
return operandTransform;
}

@Override
public RelRule.Config withOperandSupplier(RelRule.OperandTransform operandTransform) {
return new DefaultRuleConfig(relBuilderFactory, description, operandTransform);
}

@Override
public RelOptRule toRule() {
return null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,18 @@
import org.apache.calcite.plan.RelRule;
import org.apache.calcite.rel.core.Correlate;

public class InstanceAccessByIdRule extends RelRule<InstanceAccessByIdRule.Config> {
public static final InstanceAccessByIdRule INSTANCE = Config.DEFAULT.toRule();
public class InstanceAccessByIdRule extends RelRule<RelRule.Config> {
public static final InstanceAccessByIdRule INSTANCE =
new InstanceAccessByIdRule(
DefaultRuleConfig.EMPTY
.withOperandSupplier(
b0 ->
b0.operand(Correlate.class)
.anyInputs()
)
);

public interface Config extends RelRule.Config {
InstanceAccessByIdRule.Config DEFAULT = EMPTY
.withOperandSupplier(b0 ->
b0.operand(Correlate.class)
.anyInputs())
.as(InstanceAccessByIdRule.Config.class);

@Override
default InstanceAccessByIdRule toRule() {
return new InstanceAccessByIdRule(this);
}
}

public InstanceAccessByIdRule(Config config) {
public InstanceAccessByIdRule(RelRule.Config config) {
super(config);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,28 @@
import com.github.vlsi.mat.calcite.SnapshotHolder;
import com.github.vlsi.mat.calcite.rex.ExecutionRexBuilderContext;
import com.github.vlsi.mat.calcite.rex.RexBuilderContext;
import com.github.vlsi.mat.calcite.rules.DefaultRuleConfig;

import org.apache.calcite.plan.RelOptRuleCall;
import org.apache.calcite.plan.RelOptSchema;
import org.apache.calcite.plan.RelOptTable;
import org.apache.calcite.plan.RelRule;
import org.apache.calcite.plan.ViewExpanders;
import org.apache.calcite.plan.*;
import org.apache.calcite.rex.RexNode;
import org.apache.calcite.tools.RelBuilder;

import java.util.ArrayList;
import java.util.List;
import java.util.function.Function;

public class InstanceAccessByClassIdRule extends RelRule<InstanceAccessByClassIdRule.Config> {
public static final InstanceAccessByClassIdRule INSTANCE = Config.DEFAULT.toRule();

public interface Config extends RelRule.Config {
InstanceAccessByClassIdRule.Config DEFAULT = EMPTY
.withOperandSupplier(b0 ->
b0.operand(InstanceByClassTableScan.class)
.anyInputs())
.as(Config.class);

@Override
default InstanceAccessByClassIdRule toRule() {
return new InstanceAccessByClassIdRule(this);
}
}

public InstanceAccessByClassIdRule(InstanceAccessByClassIdRule.Config config) {
public class InstanceAccessByClassIdRule extends RelRule<RelRule.Config> {
public static final InstanceAccessByClassIdRule INSTANCE =
new InstanceAccessByClassIdRule(
DefaultRuleConfig.EMPTY
.withOperandSupplier(
b0 ->
b0.operand(InstanceByClassTableScan.class)
.anyInputs()
)
);

public InstanceAccessByClassIdRule(RelRule.Config config) {
super(config);
}

Expand Down
2 changes: 1 addition & 1 deletion MatCalciteRepository/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
<repository>
<id>photon</id>
<layout>p2</layout>
<url>http://download.eclipse.org/releases/photon</url>
<url>https://download.eclipse.org/releases/2023-09</url>
</repository>
</repositories>
<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion MatCalciteTargetPlatform/MatCalciteTargetPlatform.target
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<unit id="org.eclipse.rcp.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.p2.user.ui.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.executable.feature.group" version="0.0.0"/>
<repository location="http://download.eclipse.org/releases/photon/"/>
<repository location="https://download.eclipse.org/releases/2023-09"/>
</location>
</locations>
</target>
22 changes: 7 additions & 15 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@
<name>MAT Calcite plugin parent</name>

<properties>
<tycho-version>1.3.0</tycho-version>
<tycho-extras-version>${tycho-version}</tycho-extras-version>
<eclipse-repository>http://download.eclipse.org/releases/photon</eclipse-repository>
<tycho-version>4.0.3</tycho-version>
<eclipse-repository>https://download.eclipse.org/releases/2023-09</eclipse-repository>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
</properties>

<modules>
Expand Down Expand Up @@ -53,18 +52,10 @@
<goal>plugin-source</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho.extras</groupId>
<artifactId>tycho-source-feature-plugin</artifactId>
<version>${tycho-extras-version}</version>
<executions>
<execution>
<id>source-feature</id>
<phase>package</phase>
<id>feature-source</id>
<goals>
<goal>source-feature</goal>
<goal>feature-source</goal>
</goals>
</execution>
</executions>
Expand Down Expand Up @@ -112,6 +103,7 @@
<version>${tycho-version}</version>
<configuration>
<!--<pomDependencies>consider</pomDependencies>-->
<executionEnvironment>JavaSE-17</executionEnvironment>
<target>
<artifact>
<groupId>com.github.vlsi.mat.calcite</groupId>
Expand Down

0 comments on commit e3f6c7f

Please sign in to comment.