Skip to content

Commit

Permalink
Minor adjustments while reviewing
Browse files Browse the repository at this point in the history
  • Loading branch information
vogti committed Dec 2, 2023
1 parent 4c54dfd commit bfdcd5e
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 19 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,6 @@ nbdist/
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!/gradle/wrapper/gradle-wrapper.jar

/geode-adapter/vf.gf.server.status.cmd
/core/custom-namespace-model.json
/testTestCsv/**
!/libs/avatica-1.16.0-POLYPHENYDB-shaded.jar
!/libs/avatica-server-1.16.0-POLYPHENYDB.jar
/dbms/target/
Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@

* Add support for the labeled property graph data model
* Add support for the cypher query language
* Add a neo4j data store adapterTemplate
* Add a neo4j data store adapter
* Improve cross-model query support
* Improve the document data model
* Improve handling of DML queries containing operations not supported on the underlying data store
* Improve constraint enforcement
* Refactor transaction locking
* Add a remote deployment support for the MongoDB adapterTemplate
* Add a remote deployment support for the MongoDB adapter
* Allow specifying colors for information graphs
* Add a logging for the number of monitoring threads
* Option to select a time interval for the graph in the UI dashboard
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/java/org/polypheny/db/PolyImplementation.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2022 The Polypheny Project
* Copyright 2019-2023 The Polypheny Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -261,7 +261,7 @@ public static Meta.StatementType toStatementType( Kind kind ) {
return Meta.StatementType.IS_DML;
}

throw new GenericRuntimeException( "Statement type does not exist." );
throw new GenericRuntimeException( "Illegal statement type: " + kind.name() );
}


Expand Down
5 changes: 1 addition & 4 deletions core/src/main/java/org/polypheny/db/ResultIterator.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import org.polypheny.db.transaction.Statement;
import org.polypheny.db.type.entity.PolyValue;


@Value
public class ResultIterator implements AutoCloseable {

Expand All @@ -62,7 +63,6 @@ public ResultIterator( Iterator<PolyValue[]> iterator, Statement statement, int


public List<List<PolyValue>> getNextBatch() {

StopWatch stopWatch = null;
try {
if ( isTimed ) {
Expand Down Expand Up @@ -93,7 +93,6 @@ public List<List<PolyValue>> getNextBatch() {
} catch ( Exception e ) {
throw new GenericRuntimeException( t );
}

}
}

Expand Down Expand Up @@ -131,9 +130,7 @@ private <D> List<D> getNextBatch( @Nullable Function<PolyValue[], D> transformer


public List<PolyValue[]> getArrayRows() {

return getNextBatch( rowType.getFieldCount() == 1 ? e -> (PolyValue[]) e : null );

}


Expand Down
4 changes: 2 additions & 2 deletions core/src/main/java/org/polypheny/db/StatisticsManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public abstract class StatisticsManager implements PropertyChangeListener {

public static StatisticsManager setAndGetInstance( StatisticsManager transaction ) {
if ( INSTANCE != null ) {
throw new GenericRuntimeException( "Overwriting the MaterializedViewManager is not permitted." );
throw new GenericRuntimeException( "Overwriting the StatisticsManager is not permitted." );
}
INSTANCE = transaction;
return INSTANCE;
Expand All @@ -45,7 +45,7 @@ public static StatisticsManager getInstance() {
}


// Use relNode to update
// Use algNode to update
public abstract void tablesToUpdate( long tableId );

// Use cache if possible
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ public static List<AbstractAdapterSetting> serializeSettings( List<AbstractAdapt

public enum AdapterSettingType {
DIRECTORY, INTEGER, LIST, STRING, BOOLEAN

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

@Accessors(chain = true)
public class AbstractAdapterSettingList extends AbstractAdapterSetting {

public List<String> options;
public boolean dynamic = false;

Expand Down
5 changes: 2 additions & 3 deletions core/src/main/java/org/polypheny/db/adapter/Adapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package org.polypheny.db.adapter;


import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
Expand Down Expand Up @@ -53,6 +52,7 @@
import org.polypheny.db.schema.types.Expressible;
import org.polypheny.db.transaction.PolyXid;


@Getter
@Slf4j
public abstract class Adapter<S extends StoreCatalog> implements Scannable, Expressible {
Expand Down Expand Up @@ -103,7 +103,7 @@ public Adapter( long adapterId, String uniqueName, Map<String, String> settings,
informationGroups = new ArrayList<>();
informationElements = new ArrayList<>();

// this is need for docker deployable stores and should not interfere too much with other adapters
// This is need for docker deployable stores and should not interfere too much with other adapters
if ( deployMode == DeployMode.DOCKER ) {
this.listener = attachListener( Integer.parseInt( settings.get( "instanceId" ) ) );
}
Expand Down Expand Up @@ -183,7 +183,6 @@ protected List<String> applySettings( Map<String, String> newSettings ) {
updatedSettings.add( newSetting.getKey() );
}
}

return updatedSettings;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import org.polypheny.db.catalog.entity.allocation.AllocationEntity;
import org.polypheny.db.catalog.exceptions.GenericRuntimeException;


public class AdapterManager {

public static Expression ADAPTER_MANAGER_EXPRESSION = Expressions.call( AdapterManager.class, "getInstance" );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
import java.util.ArrayList;
import java.util.List;

//see https://stackoverflow.com/questions/19588020/gson-serialize-a-list-of-polymorphic-objects/22081826#22081826

// See https://stackoverflow.com/questions/19588020/gson-serialize-a-list-of-polymorphic-objects/22081826#22081826
public class AdapterSettingDeserializer implements JsonDeserializer<AbstractAdapterSetting> {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import java.lang.annotation.Target;
import org.polypheny.db.adapter.DeployMode;


@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface AdapterProperties {
Expand All @@ -34,5 +35,4 @@

DeployMode defaultMode();


}

0 comments on commit bfdcd5e

Please sign in to comment.