Skip to content

Commit c534f99

Browse files
authored
Upgrade dependencies
* Upgrade log4j * Upgrade netty * Upgrade cats * Upgrade eff * Upgrade upickle * Upgrade h2
1 parent 7e669e9 commit c534f99

File tree

9 files changed

+35
-27
lines changed

9 files changed

+35
-27
lines changed

gradle/libs.versions.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
[versions]
22
apache-commons-text = "1.14.0"
33
bctls = "1.59"
4-
cats = "1.6.0"
4+
cats = "2.13.0"
55
claimant = "0.0.2"
66
cypher-frontend = "9.0.20190305"
77
cypher-tck = "1.0.0-M14"
88
discipline = "0.11.0"
9-
eff = "5.0.0"
9+
eff = "7.0.6"
1010
fastparse = "2.1.0"
11-
h2 = "1.4.196"
11+
h2 = "2.4.240"
1212
# Note: has shared transitive dependencies with spark
1313
hadoop = "3.3.4"
1414
junit-main = "4.12"
1515
junit-runner = "1.0.2"
16-
log4j-main = "2.11.0"
17-
log4j-scala = "11.0"
16+
log4j-main = "2.25.2"
17+
log4j-scala = "13.1.0"
1818
mockito = "1.10.19"
1919
neo4j-driver = "1.7.2"
20-
netty = "4.1.24.Final"
20+
netty = "4.2.7.Final"
2121
# @pin - let's prevent automatic updates for the moment
2222
scala-full = "2.12.20"
2323
# @pin - let's prevent automatic updates for the moment
@@ -26,7 +26,7 @@ scalacheck = "1.14.0"
2626
scalatest = "3.0.6"
2727
spark = "3.5.7"
2828
testcontainers = "2.0.2"
29-
upickle = "0.7.1"
29+
upickle = "4.4.1"
3030

3131
[libraries]
3232
apache-commons-text = { module = "org.apache.commons:commons-text", version.ref = "apache-commons-text" }

morpheus-examples/src/main/resources/northwind/sql/northwind_data.sql

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,15 @@ INSERT INTO Territories VALUES ('98004','Bellevue',2);
5757
INSERT INTO Territories VALUES ('98052','Redmond',2);
5858
INSERT INTO Territories VALUES ('98104','Seattle',2);
5959

60-
INSERT INTO Employees VALUES(2,'Fuller','Andrew','Vice President, Sales','Dr.',TO_DATE('1952-02-19','YYYY-MM-DD'),TO_DATE('1992-08-14','YYYY-MM-DD'),'908 W. Capital Way','Tacoma','WA','98401','USA','(206) 555-9482','3457',NULL,NULL,NULL,'http://accweb/emmployees/fuller.bmp');
61-
INSERT INTO Employees VALUES(1,'Davolio','Nancy','Sales Representative','Ms.',TO_DATE('1948-12-08','YYYY-MM-DD'),TO_DATE('1992-05-01','YYYY-MM-DD'),'507 - 20th Ave. E.Apt. 2A','Seattle','WA','98122','USA','(206) 555-9857','5467',NULL,NULL,2,'http://accweb/emmployees/davolio.bmp');
62-
INSERT INTO Employees VALUES(3,'Leverling','Janet','Sales Representative','Ms.',TO_DATE('1963-08-30','YYYY-MM-DD'),TO_DATE('1992-04-01','YYYY-MM-DD'),'722 Moss Bay Blvd.','Kirkland','WA','98033','USA','(206) 555-3412','3355',NULL,NULL,2,'http://accweb/emmployees/leverling.bmp');
63-
INSERT INTO Employees VALUES(4,'Peacock','Margaret','Sales Representative','Mrs.',TO_DATE('1937-09-19','YYYY-MM-DD'),TO_DATE('1993-05-03','YYYY-MM-DD'),'4110 Old Redmond Rd.','Redmond','WA','98052','USA','(206) 555-8122','5176',NULL,NULL,2,'http://accweb/emmployees/peacock.bmp');
64-
INSERT INTO Employees VALUES(5,'Buchanan','Steven','Sales Manager','Mr.',TO_DATE('1955-03-04','YYYY-MM-DD'),TO_DATE('1993-10-17','YYYY-MM-DD'),'14 Garrett Hill','London',NULL,'SW1 8JR','UK','(71) 555-4848','3453',NULL,NULL,2,'http://accweb/emmployees/buchanan.bmp');
65-
INSERT INTO Employees VALUES(6,'Suyama','Michael','Sales Representative','Mr.',TO_DATE('1963-07-02','YYYY-MM-DD'),TO_DATE('1993-10-17','YYYY-MM-DD'),'Coventry House Miner Rd.','London',NULL,'EC2 7JR','UK','(71) 555-7773','428',NULL,NULL,5,'http://accweb/emmployees/davolio.bmp');
66-
INSERT INTO Employees VALUES(7,'King','Robert','Sales Representative','Mr.',TO_DATE('1960-05-29','YYYY-MM-DD'),TO_DATE('1994-01-02','YYYY-MM-DD'),'Edgeham Hollow Winchester Way','London',NULL,'RG1 9SP','UK','(71) 555-5598','465',NULL,NULL,5,'http://accweb/emmployees/davolio.bmp');
67-
INSERT INTO Employees VALUES(8,'Callahan','Laura','Inside Sales Coordinator','Ms.',TO_DATE('1958-01-09','YYYY-MM-DD'),TO_DATE('1994-03-05','YYYY-MM-DD'),'4726 - 11th Ave. N.E.','Seattle','WA','98105','USA','(206) 555-1189','2344',NULL,NULL,2,'http://accweb/emmployees/davolio.bmp');
68-
INSERT INTO Employees VALUES(9,'Dodsworth','Anne','Sales Representative','Ms.',TO_DATE('1966-01-27','YYYY-MM-DD'),TO_DATE('1994-11-15','YYYY-MM-DD'),'7 Houndstooth Rd.','London',NULL,'WG2 7LT','UK','(71) 555-4444','452',NULL,NULL,5,'http://accweb/emmployees/davolio.bmp');
60+
INSERT INTO Employees VALUES(2,'Fuller','Andrew','Vice President, Sales','Dr.',DATE '1952-02-19',DATE '1992-08-14','908 W. Capital Way','Tacoma','WA','98401','USA','(206) 555-9482','3457',NULL,NULL,NULL,'http://accweb/emmployees/fuller.bmp');
61+
INSERT INTO Employees VALUES(1,'Davolio','Nancy','Sales Representative','Ms.',DATE '1948-12-08',DATE '1992-05-01','507 - 20th Ave. E.Apt. 2A','Seattle','WA','98122','USA','(206) 555-9857','5467',NULL,NULL,2,'http://accweb/emmployees/davolio.bmp');
62+
INSERT INTO Employees VALUES(3,'Leverling','Janet','Sales Representative','Ms.',DATE '1963-08-30',DATE '1992-04-01','722 Moss Bay Blvd.','Kirkland','WA','98033','USA','(206) 555-3412','3355',NULL,NULL,2,'http://accweb/emmployees/leverling.bmp');
63+
INSERT INTO Employees VALUES(4,'Peacock','Margaret','Sales Representative','Mrs.',DATE '1937-09-19',DATE '1993-05-03','4110 Old Redmond Rd.','Redmond','WA','98052','USA','(206) 555-8122','5176',NULL,NULL,2,'http://accweb/emmployees/peacock.bmp');
64+
INSERT INTO Employees VALUES(5,'Buchanan','Steven','Sales Manager','Mr.',DATE '1955-03-04',DATE '1993-10-17','14 Garrett Hill','London',NULL,'SW1 8JR','UK','(71) 555-4848','3453',NULL,NULL,2,'http://accweb/emmployees/buchanan.bmp');
65+
INSERT INTO Employees VALUES(6,'Suyama','Michael','Sales Representative','Mr.',DATE '1963-07-02',DATE '1993-10-17','Coventry House Miner Rd.','London',NULL,'EC2 7JR','UK','(71) 555-7773','428',NULL,NULL,5,'http://accweb/emmployees/davolio.bmp');
66+
INSERT INTO Employees VALUES(7,'King','Robert','Sales Representative','Mr.',DATE '1960-05-29',DATE '1994-01-02','Edgeham Hollow Winchester Way','London',NULL,'RG1 9SP','UK','(71) 555-5598','465',NULL,NULL,5,'http://accweb/emmployees/davolio.bmp');
67+
INSERT INTO Employees VALUES(8,'Callahan','Laura','Inside Sales Coordinator','Ms.',DATE '1958-01-09',DATE '1994-03-05','4726 - 11th Ave. N.E.','Seattle','WA','98105','USA','(206) 555-1189','2344',NULL,NULL,2,'http://accweb/emmployees/davolio.bmp');
68+
INSERT INTO Employees VALUES(9,'Dodsworth','Anne','Sales Representative','Ms.',DATE '1966-01-27',DATE '1994-11-15','7 Houndstooth Rd.','London',NULL,'WG2 7LT','UK','(71) 555-4444','452',NULL,NULL,5,'http://accweb/emmployees/davolio.bmp');
6969

7070
INSERT INTO EmployeeTerritories VALUES (1,'06897');
7171
INSERT INTO EmployeeTerritories VALUES (1,'19713');

morpheus-examples/src/main/resources/northwind/sql/northwind_schema.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ CREATE TABLE Employees
2828
ReportsTo
2929
) REFERENCES Employees (
3030
EmployeeID
31-
),
31+
)
3232

3333
);
3434

morpheus-examples/src/main/scala/org/opencypher/morpheus/util/NorthwindDB.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ object NorthwindDB {
3838
def init(sqlDataSourceConfig: SqlDataSourceConfig.Jdbc): Unit = {
3939

4040
withConnection(sqlDataSourceConfig) { connection =>
41-
connection.execute("DROP SCHEMA IF EXISTS NORTHWIND")
41+
connection.execute("DROP SCHEMA IF EXISTS NORTHWIND CASCADE")
4242
connection.execute("CREATE SCHEMA NORTHWIND")
4343
connection.setSchema("NORTHWIND")
4444

morpheus-spark-cypher/src/main/scala/org/opencypher/morpheus/api/MorpheusSession.scala

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
*/
2727
package org.opencypher.morpheus.api
2828

29-
import java.io.File
3029
import java.util.UUID
3130

3231
import org.apache.spark.SparkConf
@@ -42,6 +41,7 @@ import org.opencypher.okapi.impl.exception.UnsupportedOperationException
4241
import org.opencypher.okapi.relational.api.graph.RelationalCypherSession
4342
import org.opencypher.okapi.relational.api.planning.RelationalCypherResult
4443

44+
import java.nio.file.Files
4545
import scala.reflect.runtime.universe._
4646

4747
/**
@@ -94,18 +94,19 @@ object MorpheusSession extends Serializable {
9494
*/
9595
def create(implicit sparkSession: SparkSession): MorpheusSession = new MorpheusSession(sparkSession)
9696

97-
val localSparkConf: SparkConf = {
97+
def localSparkConf: SparkConf = {
9898
val conf = new SparkConf(true)
9999
conf.set("spark.sql.codegen.wholeStage", "true")
100100
conf.set("spark.sql.shuffle.partitions", "12")
101-
conf.set("spark.default.parallelism", "8")
101+
conf.set("spark.default.parallelism", Runtime.getRuntime.availableProcessors().toString)
102102
// Required for left outer join without join expressions in OPTIONAL MATCH (leads to cartesian product)
103103
conf.set("spark.sql.crossJoin.enabled", "true")
104104
// We should probably remove this setting. Hide errors like: You're using untyped Scala UDF, which does not have the input type information. Spark may blindly pass null to the Scala closure with primitive-type argument, and the closure will see the default value of the Java type for the null argument, e.g. `udf((x: Int) => x, IntegerType)`, the result is 0 for null input.
105105
conf.set("spark.sql.legacy.allowUntypedScalaUDF", "true")
106106

107107
// Store Hive tables in local temp folder
108-
conf.set("spark.sql.warehouse.dir", s"${System.getProperty("java.io.tmpdir")}${File.separator}spark-warehouse-${System.nanoTime()}")
108+
conf.set("spark.sql.warehouse.dir", Files.createTempDirectory("spark-warehouse").toString)
109+
conf.set("spark.hadoop.hive.metastore.warehouse.dir", Files.createTempDirectory("hive-warehouse").toString)
109110
// Configure Hive to run with in-memory Derby (skips writing metastore_db)
110111
conf.set("javax.jdo.option.ConnectionURL", "jdbc:derby:memory:metastore_db;create=true")
111112
conf.set("javax.jdo.option.ConnectionDriverName", "org.apache.derby.jdbc.EmbeddedDriver")

morpheus-testing/src/main/scala/org/opencypher/morpheus/testing/fixture/H2Fixture.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ trait H2Fixture extends SparkSessionFixture {
3939
}
4040

4141
def dropH2Database(cfg: SqlDataSourceConfig.Jdbc, name: String): Unit = {
42-
withConnection(cfg) { conn => conn.execute(s"DROP SCHEMA IF EXISTS $name")}
42+
withConnection(cfg) { conn => conn.execute(s"DROP SCHEMA IF EXISTS $name CASCADE")}
4343
}
4444

4545
def freshH2Database(cfg: SqlDataSourceConfig.Jdbc, name: String): Unit = {

okapi-api/src/main/scala/org/opencypher/okapi/api/schema/PropertyGraphSchema.scala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ object PropertyGraphSchema {
4848
)
4949

5050
def fromJson(jsonString: String): PropertyGraphSchema =
51-
upickle.default.read[PropertyGraphSchema](jsonString)
51+
try upickle.default.read[PropertyGraphSchema](jsonString)
52+
catch {
53+
case throwable: Throwable if Option(throwable.getCause).exists(_.getClass.getPackageName.startsWith("org.opencypher")) =>
54+
throw throwable.getCause
55+
}
5256
}
5357

5458
/**

okapi-api/src/main/scala/org/opencypher/okapi/impl/schema/PropertyGraphSchemaImpl.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ object PropertyGraphSchemaImpl {
8888
case other => throw SchemaException(s"Expected Version to be a String or a Number but got $other")
8989
}
9090
val version = Version(versionString)
91-
if(!version.compatibleWith(PropertyGraphSchema.CURRENT_VERSION)) throw SchemaException("Incompatible Schema versions")
91+
if(!version.compatibleWith(PropertyGraphSchema.CURRENT_VERSION)) throw SchemaException(s"Incompatible Schema version: $version")
9292

9393
val labelPropertyMap = read[LabelPropertyMap](json.obj(LABEL_PROPERTY_MAP))
9494
val relTypePropertyMap = read[RelTypePropertyMap](json.obj(REL_TYPE_PROPERTY_MAP))

okapi-api/src/test/scala/org/opencypher/okapi/api/schema/PropertyGraphSchemaTest.scala

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -803,8 +803,11 @@ class PropertyGraphSchemaTest extends ApiBaseTest {
803803
s"${PropertyGraphSchema.CURRENT_VERSION.major + 1}.0",
804804
s"${PropertyGraphSchema.CURRENT_VERSION.major - 1}.5"
805805
).foreach { v =>
806-
an[SchemaException] shouldBe thrownBy {
807-
PropertyGraphSchema.fromJson(schemaJson(Version(v)))
806+
val json = schemaJson(Version(v))
807+
withClue(s"json: $json") {
808+
an[SchemaException] shouldBe thrownBy {
809+
PropertyGraphSchema.fromJson(json)
810+
}
808811
}
809812
}
810813
}

0 commit comments

Comments
 (0)