Search in sources :

Example 26 with PointValue

use of org.neo4j.values.storable.PointValue in project neo4j by neo4j.

the class GenericAccessorPointsTest method mustHandlePointArraysWithinSameTile.

/**
 * This test verify that we correctly handle unique point arrays where every point in every array belong to the same tile on the space filling curve.
 * We verify this by asserting that we always get exactly one hit on an exact match and that the value is what we expect.
 */
@Test
void mustHandlePointArraysWithinSameTile() throws IndexEntryConflictException, IndexNotApplicableKernelException {
    // given
    // Many random points that all are close enough to each other to belong to the same tile on the space filling curve.
    int nbrOfValues = 10000;
    PointValue origin = Values.pointValue(WGS84, 0.0, 0.0);
    Long derivedValueForCenterPoint = curve.derivedValueFor(origin.coordinate());
    double[] centerPoint = curve.centerPointFor(derivedValueForCenterPoint);
    double xWidthMultiplier = curve.getTileWidth(0, curve.getMaxLevel()) / 2;
    double yWidthMultiplier = curve.getTileWidth(1, curve.getMaxLevel()) / 2;
    List<Value> pointArrays = new ArrayList<>();
    List<IndexEntryUpdate<?>> updates = new ArrayList<>();
    for (int i = 0; i < nbrOfValues; i++) {
        int arrayLength = random.nextInt(5) + 1;
        PointValue[] pointValues = new PointValue[arrayLength];
        for (int j = 0; j < arrayLength; j++) {
            double x = (random.nextDouble() * 2 - 1) * xWidthMultiplier;
            double y = (random.nextDouble() * 2 - 1) * yWidthMultiplier;
            PointValue value = Values.pointValue(WGS84, centerPoint[0] + x, centerPoint[1] + y);
            assertDerivedValue(derivedValueForCenterPoint, value);
            pointValues[j] = value;
        }
        PointArray array = Values.pointArray(pointValues);
        pointArrays.add(array);
        updates.add(IndexEntryUpdate.add(i, descriptor, array));
    }
    processAll(updates);
    // then
    exactMatchOnAllValues(pointArrays);
}
Also used : IndexEntryUpdate(org.neo4j.storageengine.api.IndexEntryUpdate) PointValue(org.neo4j.values.storable.PointValue) Value(org.neo4j.values.storable.Value) PointValue(org.neo4j.values.storable.PointValue) ArrayList(java.util.ArrayList) PointArray(org.neo4j.values.storable.PointArray) Test(org.junit.jupiter.api.Test)

Example 27 with PointValue

use of org.neo4j.values.storable.PointValue in project neo4j by neo4j.

the class GenericAccessorPointsTest method mustHandlePointsWithinSameTile.

/**
 * This test verify that we correctly handle unique points that all belong to the same tile on the space filling curve.
 * All points share at least one dimension coordinate with another point to exercise minimal splitter.
 * We verify this by asserting that we always get exactly one hit on an exact match and that the value is what we expect.
 */
@Test
void mustHandlePointsWithinSameTile() throws IndexEntryConflictException, IndexNotApplicableKernelException {
    // given
    // Many random points that all are close enough to each other to belong to the same tile on the space filling curve.
    int nbrOfValues = 10000;
    PointValue origin = Values.pointValue(WGS84, 0.0, 0.0);
    Long derivedValueForCenterPoint = curve.derivedValueFor(origin.coordinate());
    double[] centerPoint = curve.centerPointFor(derivedValueForCenterPoint);
    double xWidthMultiplier = curve.getTileWidth(0, curve.getMaxLevel()) / 2;
    double yWidthMultiplier = curve.getTileWidth(1, curve.getMaxLevel()) / 2;
    List<Value> pointValues = new ArrayList<>();
    List<IndexEntryUpdate<?>> updates = new ArrayList<>();
    long nodeId = 1;
    for (int i = 0; i < nbrOfValues / 4; i++) {
        double x1 = (random.nextDouble() * 2 - 1) * xWidthMultiplier;
        double x2 = (random.nextDouble() * 2 - 1) * xWidthMultiplier;
        double y1 = (random.nextDouble() * 2 - 1) * yWidthMultiplier;
        double y2 = (random.nextDouble() * 2 - 1) * yWidthMultiplier;
        PointValue value11 = Values.pointValue(WGS84, centerPoint[0] + x1, centerPoint[1] + y1);
        PointValue value12 = Values.pointValue(WGS84, centerPoint[0] + x1, centerPoint[1] + y2);
        PointValue value21 = Values.pointValue(WGS84, centerPoint[0] + x2, centerPoint[1] + y1);
        PointValue value22 = Values.pointValue(WGS84, centerPoint[0] + x2, centerPoint[1] + y2);
        assertDerivedValue(derivedValueForCenterPoint, value11, value12, value21, value22);
        nodeId = addPointsToLists(pointValues, updates, nodeId, value11, value12, value21, value22);
    }
    processAll(updates);
    // then
    exactMatchOnAllValues(pointValues);
}
Also used : IndexEntryUpdate(org.neo4j.storageengine.api.IndexEntryUpdate) PointValue(org.neo4j.values.storable.PointValue) Value(org.neo4j.values.storable.Value) PointValue(org.neo4j.values.storable.PointValue) ArrayList(java.util.ArrayList) Test(org.junit.jupiter.api.Test)

Example 28 with PointValue

use of org.neo4j.values.storable.PointValue in project neo4j by neo4j.

the class GenericAccessorPointsTest method shouldNotGetFalsePositivesForRangesSpanningMultipleTiles.

/**
 * Given how the spatial index works, if a point is on a tile that intersect with the search area,
 * but the point itself is outside the search area, it is a candidate for a false positive.
 * The reason is that such a point is returned from the index itself,
 * because a space index compares (and generally works with) only values of a space-filling curve
 * and not the points themselves.
 * Therefore {@link IndexReader} implementation must post-process raw index results and filter out such false positives.
 */
@Test
void shouldNotGetFalsePositivesForRangesSpanningMultipleTiles() throws IndexNotApplicableKernelException, IndexEntryConflictException {
    PointValue origin = Values.pointValue(WGS84, 0.0, 0.0);
    long derivedValueForCenterPoint = curve.derivedValueFor(origin.coordinate());
    double[] searchStart = curve.centerPointFor(derivedValueForCenterPoint);
    double xTileWidth = curve.getTileWidth(0, curve.getMaxLevel());
    // to make it easier to imagine this, the search start is a center point of one tile and the limit is a center point of the next tile on the x-axis
    PointValue limitPoint = Values.pointValue(WGS84, searchStart[0] + xTileWidth, searchStart[1]);
    int nbrOfValues = 10_000;
    List<PointValue> pointsInside = new ArrayList<>();
    List<IndexEntryUpdate<?>> updates = new ArrayList<>();
    for (int i = 0; i < nbrOfValues; i++) {
        double distanceMultiplier = random.nextDouble() * 2;
        PointValue point = Values.pointValue(WGS84, searchStart[0] + distanceMultiplier * xTileWidth, searchStart[1]);
        updates.add(IndexEntryUpdate.add(0, descriptor, point));
        if (distanceMultiplier <= 1) {
            pointsInside.add(point);
        }
    }
    processAll(updates);
    try (var indexReader = accessor.newValueReader()) {
        SimpleEntityValueClient client = new SimpleEntityValueClient();
        var range = PropertyIndexQuery.range(descriptor.schema().getPropertyId(), Values.pointValue(WGS84, searchStart), true, limitPoint, true);
        indexReader.query(QueryContext.NULL_CONTEXT, client, unorderedValues(), range);
        List<Value> queryResult = new ArrayList<>();
        while (client.next()) {
            queryResult.add(client.values[0]);
        }
        assertThat(queryResult).containsExactlyInAnyOrderElementsOf(pointsInside);
    }
}
Also used : IndexEntryUpdate(org.neo4j.storageengine.api.IndexEntryUpdate) PointValue(org.neo4j.values.storable.PointValue) ArrayList(java.util.ArrayList) Value(org.neo4j.values.storable.Value) PointValue(org.neo4j.values.storable.PointValue) SimpleEntityValueClient(org.neo4j.storageengine.api.schema.SimpleEntityValueClient) Test(org.junit.jupiter.api.Test)

Example 29 with PointValue

use of org.neo4j.values.storable.PointValue in project neo4j by neo4j.

the class NativeIndexAccessorTests method getValues.

@Test
void getValues() throws IndexEntryConflictException, IndexNotApplicableKernelException {
    // given
    int nUpdates = 10000;
    Iterator<ValueIndexEntryUpdate<IndexDescriptor>> randomUpdateGenerator = valueCreatorUtil.randomUpdateGenerator(random);
    // noinspection unchecked
    ValueIndexEntryUpdate<IndexDescriptor>[] someUpdates = new ValueIndexEntryUpdate[nUpdates];
    for (int i = 0; i < nUpdates; i++) {
        someUpdates[i] = randomUpdateGenerator.next();
    }
    processAll(someUpdates);
    Value[] allValues = ValueCreatorUtil.extractValuesFromUpdates(someUpdates);
    // Pick one out of all added values and do a range query for the value group of that value
    Value value = random.among(allValues);
    ValueGroup valueGroup = value.valueGroup();
    IndexValueCapability valueCapability = indexCapability().valueCapability(valueGroup.category());
    if (!valueCapability.equals(IndexValueCapability.YES)) {
        // We don't need to do this test
        return;
    }
    PropertyIndexQuery.RangePredicate<?> supportedQuery;
    List<Value> expectedValues;
    if (Values.isGeometryValue(value)) {
        // Unless it's a point value in which case we query for the specific coordinate reference system instead
        CoordinateReferenceSystem crs = ((PointValue) value).getCoordinateReferenceSystem();
        supportedQuery = PropertyIndexQuery.range(0, crs);
        expectedValues = Arrays.stream(allValues).filter(v -> v.valueGroup() == ValueGroup.GEOMETRY).filter(v -> ((PointValue) v).getCoordinateReferenceSystem() == crs).collect(Collectors.toList());
    } else {
        supportedQuery = PropertyIndexQuery.range(0, valueGroup);
        expectedValues = Arrays.stream(allValues).filter(v -> v.valueGroup() == valueGroup).collect(Collectors.toList());
    }
    // when
    try (var reader = accessor.newValueReader()) {
        SimpleEntityValueClient client = new SimpleEntityValueClient();
        reader.query(NULL_CONTEXT, client, unorderedValues(), supportedQuery);
        // then
        while (client.next()) {
            Value foundValue = client.values[0];
            assertTrue(expectedValues.remove(foundValue), "found value that was not expected " + foundValue);
        }
        assertThat(expectedValues.size()).as("did not find all expected values").isEqualTo(0);
    }
}
Also used : BeforeEach(org.junit.jupiter.api.BeforeEach) IndexOrder(org.neo4j.internal.schema.IndexOrder) Arrays(java.util.Arrays) ValueIndexReader(org.neo4j.kernel.api.index.ValueIndexReader) SimpleEntityValueClient(org.neo4j.storageengine.api.schema.SimpleEntityValueClient) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) Iterators.filter(org.neo4j.internal.helpers.collection.Iterators.filter) NULL_CONTEXT(org.neo4j.internal.kernel.api.QueryContext.NULL_CONTEXT) Value(org.neo4j.values.storable.Value) RandomValues(org.neo4j.values.storable.RandomValues) IndexUpdater(org.neo4j.kernel.api.index.IndexUpdater) Assertions.assertFalse(org.junit.jupiter.api.Assertions.assertFalse) NULL(org.neo4j.io.pagecache.context.CursorContext.NULL) IndexEntryUpdate.remove(org.neo4j.storageengine.api.IndexEntryUpdate.remove) Predicates.alwaysTrue(org.neo4j.function.Predicates.alwaysTrue) EMPTY_LONG_ARRAY(org.neo4j.collection.PrimitiveLongCollections.EMPTY_LONG_ARRAY) Predicate(java.util.function.Predicate) Collection(java.util.Collection) Set(java.util.Set) TestDirectory(org.neo4j.test.rule.TestDirectory) Collectors(java.util.stream.Collectors) PointValue(org.neo4j.values.storable.PointValue) String.format(java.lang.String.format) ValueIndexEntryUpdate(org.neo4j.storageengine.api.ValueIndexEntryUpdate) Test(org.junit.jupiter.api.Test) IndexValueCapability(org.neo4j.internal.schema.IndexValueCapability) IndexQueryConstraints.unconstrained(org.neo4j.internal.kernel.api.IndexQueryConstraints.unconstrained) List(java.util.List) Stream(java.util.stream.Stream) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) IndexNotApplicableKernelException(org.neo4j.internal.kernel.api.exceptions.schema.IndexNotApplicableKernelException) PropertyIndexQuery(org.neo4j.internal.kernel.api.PropertyIndexQuery) IndexDescriptor(org.neo4j.internal.schema.IndexDescriptor) ValueCreatorUtil.countUniqueValues(org.neo4j.kernel.impl.index.schema.ValueCreatorUtil.countUniqueValues) Assertions.assertThrows(org.junit.jupiter.api.Assertions.assertThrows) IndexCapability(org.neo4j.internal.schema.IndexCapability) IndexDirectoryStructure.directoriesByProvider(org.neo4j.kernel.api.index.IndexDirectoryStructure.directoriesByProvider) Iterables.asUniqueSet(org.neo4j.internal.helpers.collection.Iterables.asUniqueSet) IndexQueryConstraints.unorderedValues(org.neo4j.internal.kernel.api.IndexQueryConstraints.unorderedValues) IndexEntryUpdate.change(org.neo4j.storageengine.api.IndexEntryUpdate.change) Predicates.in(org.neo4j.function.Predicates.in) ArrayList(java.util.ArrayList) Values(org.neo4j.values.storable.Values) HashSet(java.util.HashSet) IndexEntryConflictException(org.neo4j.kernel.api.exceptions.index.IndexEntryConflictException) Assertions.assertThatThrownBy(org.assertj.core.api.Assertions.assertThatThrownBy) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) IndexSample(org.neo4j.kernel.api.index.IndexSample) Iterator(java.util.Iterator) ValueType(org.neo4j.values.storable.ValueType) IndexOrderCapability(org.neo4j.internal.schema.IndexOrderCapability) IndexQueryConstraints(org.neo4j.internal.kernel.api.IndexQueryConstraints) IndexDirectoryStructure(org.neo4j.kernel.api.index.IndexDirectoryStructure) IndexQueryConstraints.constrained(org.neo4j.internal.kernel.api.IndexQueryConstraints.constrained) PrimitiveLongCollections(org.neo4j.collection.PrimitiveLongCollections) Assertions.assertArrayEquals(org.junit.jupiter.api.Assertions.assertArrayEquals) LongIterator(org.eclipse.collections.api.iterator.LongIterator) IndexProgressor(org.neo4j.kernel.api.index.IndexProgressor) Values.of(org.neo4j.values.storable.Values.of) CoordinateReferenceSystem(org.neo4j.values.storable.CoordinateReferenceSystem) IndexSampler(org.neo4j.kernel.api.index.IndexSampler) ValueGroup(org.neo4j.values.storable.ValueGroup) Collections(java.util.Collections) ONLINE(org.neo4j.kernel.impl.api.index.IndexUpdateMode.ONLINE) FileSystemAbstraction(org.neo4j.io.fs.FileSystemAbstraction) PointValue(org.neo4j.values.storable.PointValue) ValueGroup(org.neo4j.values.storable.ValueGroup) ValueIndexEntryUpdate(org.neo4j.storageengine.api.ValueIndexEntryUpdate) PropertyIndexQuery(org.neo4j.internal.kernel.api.PropertyIndexQuery) Value(org.neo4j.values.storable.Value) PointValue(org.neo4j.values.storable.PointValue) CoordinateReferenceSystem(org.neo4j.values.storable.CoordinateReferenceSystem) IndexValueCapability(org.neo4j.internal.schema.IndexValueCapability) SimpleEntityValueClient(org.neo4j.storageengine.api.schema.SimpleEntityValueClient) Test(org.junit.jupiter.api.Test)

Example 30 with PointValue

use of org.neo4j.values.storable.PointValue in project neo4j by neo4j.

the class CsvInputBatchImportIT method buildUpExpectedData.

private static void buildUpExpectedData(List<InputEntity> nodeData, List<InputEntity> relationshipData, Map<String, InputEntity> expectedNodes, Map<String, String[]> expectedNodeNames, Map<String, Map<String, Consumer<Object>>> expectedNodePropertyVerifiers, Map<String, Map<String, Map<String, AtomicInteger>>> expectedRelationships, Map<String, AtomicLong> nodeCounts, Map<String, Map<String, Map<String, AtomicLong>>> relationshipCounts) {
    for (InputEntity node : nodeData) {
        expectedNodes.put((String) node.id(), node);
        expectedNodeNames.put(nameOf(node), node.labels());
        // Build default verifiers for all the properties that compares the property value using equals
        Assertions.assertFalse(node.hasIntPropertyKeyIds);
        Map<String, Consumer<Object>> propertyVerifiers = new TreeMap<>();
        for (int i = 0; i < node.propertyCount(); i++) {
            final Object expectedValue = node.propertyValue(i);
            Consumer verify;
            if (expectedValue instanceof TemporalAmount) {
                // Since there is no straightforward comparison for TemporalAmount we add it to a reference
                // point in time and compare the result
                verify = actualValue -> {
                    LocalDateTime referenceTemporal = LocalDateTime.of(0, 1, 1, 0, 0);
                    LocalDateTime expected = referenceTemporal.plus((TemporalAmount) expectedValue);
                    LocalDateTime actual = referenceTemporal.plus((TemporalAmount) actualValue);
                    assertEquals(expected, actual);
                };
            } else if (expectedValue instanceof Temporal) {
                final LocalDate expectedDate = ((Temporal) expectedValue).query(TemporalQueries.localDate());
                final LocalTime expectedTime = ((Temporal) expectedValue).query(TemporalQueries.localTime());
                final ZoneId expectedZoneId = ((Temporal) expectedValue).query(TemporalQueries.zone());
                verify = actualValue -> {
                    LocalDate actualDate = ((Temporal) actualValue).query(TemporalQueries.localDate());
                    LocalTime actualTime = ((Temporal) actualValue).query(TemporalQueries.localTime());
                    ZoneId actualZoneId = ((Temporal) actualValue).query(TemporalQueries.zone());
                    assertEquals(expectedDate, actualDate);
                    assertEquals(expectedTime, actualTime);
                    if (expectedZoneId == null) {
                        if (actualZoneId != null) {
                            // If the actual value is zoned it should have the default zone
                            assertEquals(testDefaultTimeZone.get(), actualZoneId);
                        }
                    } else {
                        assertEquals(expectedZoneId, actualZoneId);
                    }
                };
            } else if (expectedValue instanceof float[]) {
                verify = actualValue -> assertArrayEquals((float[]) expectedValue, (float[]) actualValue);
            } else if (expectedValue.getClass().isArray()) {
                verify = actualValue -> assertArrayEquals((Object[]) expectedValue, (Object[]) actualValue);
            } else {
                verify = actualValue -> assertEquals(expectedValue, actualValue);
            }
            propertyVerifiers.put((String) node.propertyKey(i), verify);
        }
        // Special verifier for pointA property
        Consumer verifyPointA = actualValue -> {
            // The y-coordinate should match the node number modulo 90 (so we don't break wgs boundaries)
            PointValue v = (PointValue) actualValue;
            double actualY = v.getCoordinates().get(0).getCoordinate().get(1);
            double expectedY = indexOf(node) % 90;
            String message = actualValue + " does not have y=" + expectedY;
            assertEquals(expectedY, actualY, 0.1, message);
            message = actualValue + " does not have crs=wgs-84";
            assertEquals(CoordinateReferenceSystem.WGS84.getName(), v.getCoordinateReferenceSystem().getName(), message);
        };
        propertyVerifiers.put("pointA", verifyPointA);
        // Special verifier for pointB property
        Consumer verifyPointB = actualValue -> {
            // The y-coordinate should match the node number
            PointValue v = (PointValue) actualValue;
            double actualY = v.getCoordinates().get(0).getCoordinate().get(1);
            double expectedY = indexOf(node);
            String message = actualValue + " does not have y=" + expectedY;
            assertEquals(expectedY, actualY, 0.1, message);
            message = actualValue + " does not have crs=cartesian";
            assertEquals(CoordinateReferenceSystem.Cartesian.getName(), v.getCoordinateReferenceSystem().getName(), message);
        };
        propertyVerifiers.put("pointB", verifyPointB);
        // Special verifier for pointArray property
        Consumer verifyPointArray = actualValue -> verifyPointB.accept(((PointValue[]) actualValue)[0]);
        propertyVerifiers.put("pointArray", verifyPointArray);
        expectedNodePropertyVerifiers.put(nameOf(node), propertyVerifiers);
        countNodeLabels(nodeCounts, node.labels());
    }
    for (InputEntity relationship : relationshipData) {
        // Expected relationship counts per node, type and direction
        InputEntity startNode = expectedNodes.get(relationship.startId());
        InputEntity endNode = expectedNodes.get(relationship.endId());
        {
            expectedRelationships.get(nameOf(startNode)).get(nameOf(endNode)).get(relationship.stringType).incrementAndGet();
        }
        // Expected counts per start/end node label ids
        // Let's do what CountsState#addRelationship does, roughly
        relationshipCounts.get(null).get(null).get(null).incrementAndGet();
        relationshipCounts.get(null).get(relationship.stringType).get(null).incrementAndGet();
        for (String startNodeLabelName : asSet(startNode.labels())) {
            Map<String, Map<String, AtomicLong>> startLabelCounts = relationshipCounts.get(startNodeLabelName);
            startLabelCounts.get(null).get(null).incrementAndGet();
            Map<String, AtomicLong> typeCounts = startLabelCounts.get(relationship.stringType);
            typeCounts.get(null).incrementAndGet();
            if (COMPUTE_DOUBLE_SIDED_RELATIONSHIP_COUNTS) {
                for (String endNodeLabelName : asSet(endNode.labels())) {
                    startLabelCounts.get(null).get(endNodeLabelName).incrementAndGet();
                    typeCounts.get(endNodeLabelName).incrementAndGet();
                }
            }
        }
        for (String endNodeLabelName : asSet(endNode.labels())) {
            relationshipCounts.get(null).get(null).get(endNodeLabelName).incrementAndGet();
            relationshipCounts.get(null).get(relationship.stringType).get(endNodeLabelName).incrementAndGet();
        }
    }
}
Also used : LocalDateTime(java.time.LocalDateTime) Charset.defaultCharset(java.nio.charset.Charset.defaultCharset) NullLogService(org.neo4j.logging.internal.NullLogService) RandomExtension(org.neo4j.test.extension.RandomExtension) Collector(org.neo4j.internal.batchimport.input.Collector) ZonedDateTime(java.time.ZonedDateTime) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) RecordFormatSelector.defaultFormat(org.neo4j.kernel.impl.store.format.RecordFormatSelector.defaultFormat) Random(java.util.Random) Config(org.neo4j.configuration.Config) TemporalQueries(java.time.temporal.TemporalQueries) StringUtils(org.apache.commons.lang3.StringUtils) DatabaseLayout(org.neo4j.io.layout.DatabaseLayout) DEFAULT_DATABASE_NAME(org.neo4j.configuration.GraphDatabaseSettings.DEFAULT_DATABASE_NAME) ExtendWith(org.junit.jupiter.api.extension.ExtendWith) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) RandomRule(org.neo4j.test.rule.RandomRule) TransactionLogInitializer(org.neo4j.kernel.impl.transaction.log.files.TransactionLogInitializer) Map(java.util.Map) LocalTime(java.time.LocalTime) PageCacheTracer(org.neo4j.io.pagecache.tracing.PageCacheTracer) NULL(org.neo4j.io.pagecache.context.CursorContext.NULL) AutoCreatingHashMap.nested(org.neo4j.kernel.impl.util.AutoCreatingHashMap.nested) ZoneOffset(java.time.ZoneOffset) ImportLogic(org.neo4j.internal.batchimport.ImportLogic) Transaction(org.neo4j.graphdb.Transaction) Path(java.nio.file.Path) Input(org.neo4j.internal.batchimport.input.Input) OffsetTime(java.time.OffsetTime) AutoCreatingHashMap.values(org.neo4j.kernel.impl.util.AutoCreatingHashMap.values) Collection(java.util.Collection) Set(java.util.Set) TestDirectory(org.neo4j.test.rule.TestDirectory) GraphDatabaseSettings.db_timezone(org.neo4j.configuration.GraphDatabaseSettings.db_timezone) UUID(java.util.UUID) ExecutionMonitor(org.neo4j.internal.batchimport.staging.ExecutionMonitor) RecordStorageEngine(org.neo4j.internal.recordstorage.RecordStorageEngine) PointValue(org.neo4j.values.storable.PointValue) StandardCharsets(java.nio.charset.StandardCharsets) ZoneId(java.time.ZoneId) Neo4jLayoutExtension(org.neo4j.test.extension.Neo4jLayoutExtension) String.format(java.lang.String.format) GraphDatabaseAPI(org.neo4j.kernel.internal.GraphDatabaseAPI) Test(org.junit.jupiter.api.Test) IdType(org.neo4j.internal.batchimport.input.IdType) List(java.util.List) INSTANCE(org.neo4j.memory.EmptyMemoryTracker.INSTANCE) LocalDate(java.time.LocalDate) Writer(java.io.Writer) ANY_LABEL(org.neo4j.internal.kernel.api.TokenRead.ANY_LABEL) Temporal(java.time.temporal.Temporal) DatabaseManagementService(org.neo4j.dbms.api.DatabaseManagementService) EMPTY(org.neo4j.internal.batchimport.AdditionalInitialIds.EMPTY) Label(org.neo4j.graphdb.Label) LocalDateTime(java.time.LocalDateTime) HashMap(java.util.HashMap) Function(java.util.function.Function) Supplier(java.util.function.Supplier) Node(org.neo4j.graphdb.Node) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) Configuration(org.neo4j.csv.reader.Configuration) TestDatabaseManagementServiceBuilder(org.neo4j.test.TestDatabaseManagementServiceBuilder) GraphDatabaseService(org.neo4j.graphdb.GraphDatabaseService) NeoStores(org.neo4j.kernel.impl.store.NeoStores) Inject(org.neo4j.test.extension.Inject) TemporalAmount(java.time.temporal.TemporalAmount) GraphDatabaseSettings.dense_node_threshold(org.neo4j.configuration.GraphDatabaseSettings.dense_node_threshold) BatchImporter(org.neo4j.internal.batchimport.BatchImporter) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) JobScheduler(org.neo4j.scheduler.JobScheduler) ANY_RELATIONSHIP_TYPE(org.neo4j.internal.kernel.api.TokenRead.ANY_RELATIONSHIP_TYPE) Period(java.time.Period) COMMAS(org.neo4j.csv.reader.Configuration.COMMAS) InputEntityDecorators(org.neo4j.internal.batchimport.input.InputEntityDecorators) ParallelBatchImporter(org.neo4j.internal.batchimport.ParallelBatchImporter) LogTimeZone(org.neo4j.logging.LogTimeZone) IndexImporterFactoryImpl(org.neo4j.kernel.impl.index.schema.IndexImporterFactoryImpl) InputEntity(org.neo4j.internal.batchimport.input.InputEntity) IOException(java.io.IOException) TokenStore(org.neo4j.kernel.impl.store.TokenStore) Consumer(java.util.function.Consumer) CountsAccessor(org.neo4j.counts.CountsAccessor) Assertions.assertArrayEquals(org.junit.jupiter.api.Assertions.assertArrayEquals) AtomicLong(java.util.concurrent.atomic.AtomicLong) Relationship(org.neo4j.graphdb.Relationship) TreeMap(java.util.TreeMap) CoordinateReferenceSystem(org.neo4j.values.storable.CoordinateReferenceSystem) Iterators.asSet(org.neo4j.internal.helpers.collection.Iterators.asSet) Group(org.neo4j.internal.batchimport.input.Group) AutoCreatingHashMap(org.neo4j.kernel.impl.util.AutoCreatingHashMap) NamedToken(org.neo4j.token.api.NamedToken) Assertions(org.junit.jupiter.api.Assertions) ThreadPoolJobScheduler(org.neo4j.test.scheduler.ThreadPoolJobScheduler) Pair(org.neo4j.internal.helpers.collection.Pair) FileSystemAbstraction(org.neo4j.io.fs.FileSystemAbstraction) LocalTime(java.time.LocalTime) ZoneId(java.time.ZoneId) PointValue(org.neo4j.values.storable.PointValue) TreeMap(java.util.TreeMap) LocalDate(java.time.LocalDate) AtomicLong(java.util.concurrent.atomic.AtomicLong) Consumer(java.util.function.Consumer) Temporal(java.time.temporal.Temporal) TemporalAmount(java.time.temporal.TemporalAmount) InputEntity(org.neo4j.internal.batchimport.input.InputEntity) Map(java.util.Map) HashMap(java.util.HashMap) TreeMap(java.util.TreeMap) AutoCreatingHashMap(org.neo4j.kernel.impl.util.AutoCreatingHashMap)

Aggregations

PointValue (org.neo4j.values.storable.PointValue)32 Test (org.junit.jupiter.api.Test)16 ArrayList (java.util.ArrayList)10 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)9 Value (org.neo4j.values.storable.Value)9 EnumSource (org.junit.jupiter.params.provider.EnumSource)7 KernelTransaction (org.neo4j.kernel.api.KernelTransaction)7 Transaction (org.neo4j.graphdb.Transaction)6 Pair (org.neo4j.internal.helpers.collection.Pair)6 CoordinateReferenceSystem (org.neo4j.values.storable.CoordinateReferenceSystem)6 GraphDatabaseService (org.neo4j.graphdb.GraphDatabaseService)5 IndexReadSession (org.neo4j.internal.kernel.api.IndexReadSession)5 Values.stringValue (org.neo4j.values.storable.Values.stringValue)5 Path (java.nio.file.Path)4 DatabaseManagementService (org.neo4j.dbms.api.DatabaseManagementService)4 Node (org.neo4j.graphdb.Node)4 TextValue (org.neo4j.values.storable.TextValue)4 Values.pointValue (org.neo4j.values.storable.Values.pointValue)4 SpaceFillingCurve (org.neo4j.gis.spatial.index.curves.SpaceFillingCurve)3 InternalTransaction (org.neo4j.kernel.impl.coreapi.InternalTransaction)3