Skip to content

Commit

Permalink
Fixed compiler errors after merge
Browse files Browse the repository at this point in the history
  • Loading branch information
craigtaverner committed Mar 9, 2017
1 parent ffb7b56 commit 22cbaba
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
Expand Up @@ -116,7 +116,7 @@ trait Compatibility[C <: CompilerContext] {
override def plannerInfo = {
import scala.collection.JavaConverters._
new PlannerInfo(inner.plannerUsed.name, inner.runtimeUsed.name, inner.plannedIndexUsage.map {
case SchemaIndexSeekUsage(identifier, label, propertyKeys) => schemaIndexUsage(identifier, label, propertyKeys.toArray)
case SchemaIndexSeekUsage(identifier, label, propertyKeys) => schemaIndexUsage(identifier, label, propertyKeys.toArray: _*)
case SchemaIndexScanUsage(identifier, label, propertyKey) => schemaIndexUsage(identifier, label, propertyKey)
case LegacyNodeIndexUsage(identifier, index) => legacyIndexUsage(identifier, "NODE", index)
case LegacyRelationshipIndexUsage(identifier, index) => legacyIndexUsage(identifier, "RELATIONSHIP", index)
Expand Down
Expand Up @@ -23,9 +23,9 @@

public abstract class IndexUsage
{
public static IndexUsage schemaIndexUsage( String identifier, String label, String propertyKey )
public static IndexUsage schemaIndexUsage( String identifier, String label, String... propertyKeys )
{
return new SchemaIndexUsage( identifier, label, propertyKey );
return new SchemaIndexUsage( identifier, label, propertyKeys );
}

public static IndexUsage legacyIndexUsage( String identifier, String entityType, String index )
Expand Down
Expand Up @@ -25,13 +25,13 @@
class SchemaIndexUsage extends IndexUsage
{
private final String label;
private final String propertyKey;
private final String[] propertyKeys;

SchemaIndexUsage( String identifier, String label, String propertyKey )
SchemaIndexUsage( String identifier, String label, String[] propertyKeys )
{
super( identifier );
this.label = label;
this.propertyKey = propertyKey;
this.propertyKeys = propertyKeys;
}

public Map<String,String> asMap()
Expand All @@ -41,7 +41,11 @@ public Map<String,String> asMap()
map.put( "entityType", "NODE" );
map.put( "identifier", identifier );
map.put( "label", label );
map.put( "propertyKey", propertyKey );
for ( int i = 0; i < propertyKeys.length; i++ )
{
String key = (propertyKeys.length > 1) ? "propertyKey_" + i : "propertyKey";
map.put( key, propertyKeys[i] );
}
return map;
}
}
Expand Up @@ -20,6 +20,7 @@
package org.neo4j.kernel.impl.api.index;

import java.io.IOException;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
Expand Down

0 comments on commit 22cbaba

Please sign in to comment.