From 4294a620274d3baa52b6dcfdec2b0f167fd61c3b Mon Sep 17 00:00:00 2001 From: fickludd Date: Mon, 5 Mar 2018 15:16:55 +0100 Subject: [PATCH] Add zoned date time layout --- .../impl/index/schema/DateSchemaKey.java | 3 +- .../index/schema/LocalDateTimeSchemaKey.java | 3 +- .../impl/index/schema/LocalTimeSchemaKey.java | 3 +- .../impl/index/schema/NativeSchemaKey.java | 6 +- .../impl/index/schema/NumberSchemaKey.java | 3 +- .../impl/index/schema/SpatialSchemaKey.java | 3 +- .../impl/index/schema/StringSchemaKey.java | 3 +- .../index/schema/TemporalIndexAccessor.java | 2 +- .../impl/index/schema/TemporalIndexFiles.java | 12 +- .../TemporalIndexPopulatingUpdater.java | 2 +- .../index/schema/TemporalIndexPopulator.java | 2 +- .../index/schema/TemporalIndexReader.java | 2 +- .../index/schema/TemporalIndexUpdater.java | 2 +- .../index/schema/ZonedDateTimeLayout.java | 114 ++++++++++++++++ .../index/schema/ZonedDateTimeSchemaKey.java | 122 ++++++++++++++++++ .../IndexProviderCompatibilityTestSuite.java | 16 ++- 16 files changed, 278 insertions(+), 20 deletions(-) create mode 100644 community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/ZonedDateTimeLayout.java create mode 100644 community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/ZonedDateTimeSchemaKey.java diff --git a/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/DateSchemaKey.java b/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/DateSchemaKey.java index e971d4180de13..07a33cb48c18c 100644 --- a/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/DateSchemaKey.java +++ b/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/DateSchemaKey.java @@ -72,12 +72,13 @@ public void writeDate( long epochDay ) } @Override - protected void assertCorrectType( Value value ) + protected Value assertCorrectType( Value value ) { if ( !(value instanceof DateValue) ) { throw new IllegalArgumentException( "Key layout does only support DateValue, tried to create key from " + value ); } + return value; } } diff --git a/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/LocalDateTimeSchemaKey.java b/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/LocalDateTimeSchemaKey.java index 1c0e60fa27718..799a401aadded 100644 --- a/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/LocalDateTimeSchemaKey.java +++ b/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/LocalDateTimeSchemaKey.java @@ -83,12 +83,13 @@ public void writeLocalDateTime( long epochSecond, int nano ) } @Override - protected void assertCorrectType( Value value ) + protected Value assertCorrectType( Value value ) { if ( !(value instanceof LocalDateTimeValue) ) { throw new IllegalArgumentException( "Key layout does only support LocalDateTimeValue, tried to create key from " + value ); } + return value; } } diff --git a/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/LocalTimeSchemaKey.java b/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/LocalTimeSchemaKey.java index 6557967d03534..ef62af69330f2 100644 --- a/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/LocalTimeSchemaKey.java +++ b/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/LocalTimeSchemaKey.java @@ -72,12 +72,13 @@ public void writeLocalTime( long nanoOfDay ) } @Override - protected void assertCorrectType( Value value ) + protected Value assertCorrectType( Value value ) { if ( !(value instanceof LocalTimeValue) ) { throw new IllegalArgumentException( "Key layout does only support LocalTimeValue, tried to create key from " + value ); } + return value; } } diff --git a/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/NativeSchemaKey.java b/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/NativeSchemaKey.java index aece9c7cec4a3..1b1a2a40d8771 100644 --- a/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/NativeSchemaKey.java +++ b/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/NativeSchemaKey.java @@ -80,12 +80,10 @@ private Value assertValidValue( Value... values ) { throw new IllegalArgumentException( "Tried to create key without value" ); } - Value value = values[0]; - assertCorrectType( value ); - return value; + return assertCorrectType( values[0] ); } - protected abstract void assertCorrectType( Value value ); + protected abstract Value assertCorrectType( Value value ); String propertiesAsString() { diff --git a/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/NumberSchemaKey.java b/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/NumberSchemaKey.java index 5f9b607a92e5c..722b9541822bd 100644 --- a/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/NumberSchemaKey.java +++ b/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/NumberSchemaKey.java @@ -46,13 +46,14 @@ class NumberSchemaKey extends NativeSchemaKey long rawValueBits; @Override - protected void assertCorrectType( Value value ) + protected Value assertCorrectType( Value value ) { if ( !Values.isNumberValue( value ) ) { throw new IllegalArgumentException( "Key layout does only support numbers, tried to create key from " + value ); } + return value; } @Override diff --git a/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/SpatialSchemaKey.java b/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/SpatialSchemaKey.java index 05af8527389b6..95d7d59409706 100644 --- a/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/SpatialSchemaKey.java +++ b/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/SpatialSchemaKey.java @@ -96,13 +96,14 @@ int compareValueTo( SpatialSchemaKey other ) } @Override - protected void assertCorrectType( Value value ) + protected Value assertCorrectType( Value value ) { if ( !Values.isGeometryValue( value ) ) { throw new IllegalArgumentException( "Key layout does only support geometries, tried to create key from " + value ); } + return value; } /** diff --git a/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/StringSchemaKey.java b/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/StringSchemaKey.java index ba2a0e9b4b83d..3a48501b85669 100644 --- a/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/StringSchemaKey.java +++ b/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/StringSchemaKey.java @@ -47,13 +47,14 @@ int size() } @Override - protected void assertCorrectType( Value value ) + protected Value assertCorrectType( Value value ) { if ( !Values.isTextValue( value ) ) { throw new IllegalArgumentException( "Key layout does only support strings, tried to create key from " + value ); } + return value; } @Override diff --git a/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/TemporalIndexAccessor.java b/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/TemporalIndexAccessor.java index 5598084a26519..543e7db21a59a 100644 --- a/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/TemporalIndexAccessor.java +++ b/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/TemporalIndexAccessor.java @@ -242,7 +242,7 @@ public PartAccessor newLocalDateTime() throws IOException @Override public PartAccessor newZonedDateTime() throws IOException { - throw new UnsupportedOperationException( "no comprende" ); + return createPartAccessor( temporalIndexFiles.zonedDateTime() ); } @Override diff --git a/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/TemporalIndexFiles.java b/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/TemporalIndexFiles.java index d7109e1f88047..1f0fa9fdbe9c5 100644 --- a/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/TemporalIndexFiles.java +++ b/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/TemporalIndexFiles.java @@ -34,7 +34,7 @@ class TemporalIndexFiles private final FileSystemAbstraction fs; private FileLayout date; private FileLayout localDateTime; - private FileLayout zonedDateTime; + private FileLayout zonedDateTime; private FileLayout localTime; private FileLayout zonedTime; private FileLayout duration; @@ -44,8 +44,9 @@ class TemporalIndexFiles this.fs = fs; File indexDirectory = directoryStructure.directoryForIndex( indexId ); this.date = new FileLayout<>( new File( indexDirectory, "date" ), DateLayout.of( descriptor ), ValueGroup.DATE ); - this.localTime = new FileLayout<>( new File( indexDirectory, "time" ), LocalTimeLayout.of( descriptor ), ValueGroup.LOCAL_TIME ); - this.localDateTime = new FileLayout<>( new File( indexDirectory, "datetime" ), LocalDateTimeLayout.of( descriptor ), ValueGroup.LOCAL_DATE_TIME ); + this.localTime = new FileLayout<>( new File( indexDirectory, "localTime" ), LocalTimeLayout.of( descriptor ), ValueGroup.LOCAL_TIME ); + this.localDateTime = new FileLayout<>( new File( indexDirectory, "localDateTime" ), LocalDateTimeLayout.of( descriptor ), ValueGroup.LOCAL_DATE_TIME ); + this.zonedDateTime = new FileLayout<>( new File( indexDirectory, "zonedDateTime" ), ZonedDateTimeLayout.of( descriptor ), ValueGroup.ZONED_DATE_TIME ); } Iterable existing() @@ -83,6 +84,11 @@ FileLayout localDateTime() return localDateTime; } + FileLayout zonedDateTime() + { + return zonedDateTime; + } + private void addIfExists( List existing, FileLayout fileLayout ) { if ( exists( fileLayout ) ) diff --git a/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/TemporalIndexPopulatingUpdater.java b/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/TemporalIndexPopulatingUpdater.java index 9e75273ef4cb2..2ab63b49ceee0 100644 --- a/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/TemporalIndexPopulatingUpdater.java +++ b/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/TemporalIndexPopulatingUpdater.java @@ -104,7 +104,7 @@ public IndexUpdater newLocalDateTime() throws IOException @Override public IndexUpdater newZonedDateTime() throws IOException { - throw new UnsupportedOperationException( "too tired to write" ); + return populator.zonedDateTime().newPopulatingUpdater( propertyAccessor ); } @Override diff --git a/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/TemporalIndexPopulator.java b/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/TemporalIndexPopulator.java index 45b7bb4b17528..bea0c910b382e 100644 --- a/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/TemporalIndexPopulator.java +++ b/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/TemporalIndexPopulator.java @@ -256,7 +256,7 @@ public PartPopulator newLocalDateTime() throws IOException @Override public PartPopulator newZonedDateTime() throws IOException { - throw new UnsupportedOperationException( "not implementedur still" ); + return create( temporalIndexFiles.zonedDateTime() ); } @Override diff --git a/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/TemporalIndexReader.java b/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/TemporalIndexReader.java index 38ff8c06b290e..f35a4a772d165 100644 --- a/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/TemporalIndexReader.java +++ b/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/TemporalIndexReader.java @@ -151,7 +151,7 @@ public TemporalIndexPartReader newLocalDateTime() @Override public TemporalIndexPartReader newZonedDateTime() { - throw new UnsupportedOperationException( "Illiterate" ); + return accessor.selectOrElse( ValueGroup.ZONED_DATE_TIME, TemporalIndexAccessor.PartAccessor::newReader, null ); } @Override diff --git a/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/TemporalIndexUpdater.java b/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/TemporalIndexUpdater.java index e3fd536d803cf..53e9556b28f92 100644 --- a/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/TemporalIndexUpdater.java +++ b/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/TemporalIndexUpdater.java @@ -97,7 +97,7 @@ public NativeSchemaIndexUpdater newLocalDateTime() throws @Override public NativeSchemaIndexUpdater newZonedDateTime() throws IOException { - throw new UnsupportedOperationException( "ma-a-da dayo" ); + return accessor.zonedDateTime().newUpdater( mode ); } @Override diff --git a/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/ZonedDateTimeLayout.java b/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/ZonedDateTimeLayout.java new file mode 100644 index 0000000000000..fbcb9750c6101 --- /dev/null +++ b/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/ZonedDateTimeLayout.java @@ -0,0 +1,114 @@ +/* + * Copyright (c) 2002-2018 "Neo Technology," + * Network Engine for Objects in Lund AB [http://neotechnology.com] + * + * This file is part of Neo4j. + * + * Neo4j is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.neo4j.kernel.impl.index.schema; + +import java.util.Comparator; + +import org.neo4j.index.internal.gbptree.Layout; +import org.neo4j.io.pagecache.PageCursor; +import org.neo4j.kernel.api.schema.index.IndexDescriptor; + +/** + * {@link Layout} for absolute date times. + */ +class ZonedDateTimeLayout extends BaseLayout +{ + private static final int ZONE_ID_FLAG = 0x0100_0000; + private static final int NO_ZONE_ID_FLAG = 0x0000_FFFF; + + public static Layout of( IndexDescriptor descriptor ) + { + return descriptor.type() == IndexDescriptor.Type.UNIQUE ? ZonedDateTimeLayout.UNIQUE : ZonedDateTimeLayout.NON_UNIQUE; + } + + private static final ZonedDateTimeLayout UNIQUE = new ZonedDateTimeLayout( "UTdt", 0, 1 ); + private static final ZonedDateTimeLayout NON_UNIQUE = new ZonedDateTimeLayout( "NTdt", 0, 1 ); + + private ZonedDateTimeLayout( + String layoutName, int majorVersion, int minorVersion ) + { + super( layoutName, majorVersion, minorVersion ); + } + + @Override + public ZonedDateTimeSchemaKey newKey() + { + return new ZonedDateTimeSchemaKey(); + } + + @Override + public ZonedDateTimeSchemaKey copyKey( ZonedDateTimeSchemaKey key, ZonedDateTimeSchemaKey into ) + { + into.epochSecondUTC = key.epochSecondUTC; + into.nanoOfSecond = key.nanoOfSecond; + into.zoneId = key.zoneId; + into.zoneOffsetSeconds = key.zoneOffsetSeconds; + into.setEntityId( key.getEntityId() ); + into.setCompareId( key.getCompareId() ); + return into; + } + + @Override + public int keySize( ZonedDateTimeSchemaKey key ) + { + return ZonedDateTimeSchemaKey.SIZE; + } + + @Override + public void writeKey( PageCursor cursor, ZonedDateTimeSchemaKey key ) + { + cursor.putLong( key.epochSecondUTC ); + cursor.putInt( key.nanoOfSecond ); + if ( key.zoneId >= 0 ) + { + cursor.putInt( key.zoneId | ZONE_ID_FLAG ); + } + else + { + cursor.putInt( key.zoneOffsetSeconds ); + } + cursor.putLong( key.getEntityId() ); + } + + @Override + public void readKey( PageCursor cursor, ZonedDateTimeSchemaKey into, int keySize ) + { + into.epochSecondUTC = cursor.getLong(); + into.nanoOfSecond = cursor.getInt(); + int encodedZone = cursor.getInt(); + if ( ( encodedZone & ZONE_ID_FLAG ) != 0 ) + { + into.zoneId = (short) ( encodedZone & NO_ZONE_ID_FLAG ); + into.zoneOffsetSeconds = 0; + } + else + { + into.zoneId = -1; + into.zoneOffsetSeconds = encodedZone; + } + into.setEntityId( cursor.getLong() ); + } + + @Override + public boolean fixedSize() + { + return true; + } +} diff --git a/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/ZonedDateTimeSchemaKey.java b/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/ZonedDateTimeSchemaKey.java new file mode 100644 index 0000000000000..50b4d3294e931 --- /dev/null +++ b/community/kernel/src/main/java/org/neo4j/kernel/impl/index/schema/ZonedDateTimeSchemaKey.java @@ -0,0 +1,122 @@ +/* + * Copyright (c) 2002-2018 "Neo Technology," + * Network Engine for Objects in Lund AB [http://neotechnology.com] + * + * This file is part of Neo4j. + * + * Neo4j is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.neo4j.kernel.impl.index.schema; + +import java.time.ZoneId; +import java.time.ZoneOffset; + +import org.neo4j.kernel.impl.store.TimeZoneMapping; +import org.neo4j.values.storable.DateTimeValue; +import org.neo4j.values.storable.Value; + +import static java.lang.String.format; + +/** + * Includes value and entity id (to be able to handle non-unique values). A value can be any {@link DateTimeValue}. + * + * With these keys the DateTimeValues are sorted by UTC time, and then by time zone. Time zones are sorted so that + * DateTimeValues with zoneOffset come first (sorted by the zoneOffset), followed by DateTimeValues with zoneIds, + * sorted by zoneNumber. + */ +class ZonedDateTimeSchemaKey extends ComparableNativeSchemaKey +{ + static final int SIZE = + Long.BYTES + /* epochSecond */ + Integer.BYTES + /* nanoOfSecond */ + Integer.BYTES + /* timeZone */ + Long.BYTES; /* entityId */ + + int nanoOfSecond; + long epochSecondUTC; + short zoneId; + int zoneOffsetSeconds; + + @Override + public Value asValue() + { + return zoneId >= 0 ? + DateTimeValue.datetime( epochSecondUTC, nanoOfSecond, ZoneId.of( TimeZoneMapping.map( zoneId ) ) ) : + DateTimeValue.datetime( epochSecondUTC, nanoOfSecond, ZoneOffset.ofTotalSeconds( zoneOffsetSeconds ) ); + } + + @Override + public void initValueAsLowest() + { + epochSecondUTC = Long.MIN_VALUE; + nanoOfSecond = Integer.MIN_VALUE; + } + + @Override + public void initValueAsHighest() + { + epochSecondUTC = Long.MAX_VALUE; + nanoOfSecond = Integer.MAX_VALUE; + } + + @Override + public int compareValueTo( ZonedDateTimeSchemaKey other ) + { + int compare = Long.compare( epochSecondUTC, other.epochSecondUTC ); + if ( compare == 0 ) + { + compare = Integer.compare( nanoOfSecond, other.nanoOfSecond ); + } + if ( compare == 0 ) + { + compare = zoneId >= 0 ? Integer.compare( zoneId, other.zoneId ) : + Integer.compare( zoneOffsetSeconds, zoneOffsetSeconds ); + } + return compare; + } + + @Override + public String toString() + { + return format( "value=%s,entityId=%d,epochSecond=%d,nanoOfSecond=%d", asValue(), getEntityId(), epochSecondUTC, nanoOfSecond ); + } + + @Override + public void writeDateTime( long epochSecondUTC, int nano, int offsetSeconds ) + { + this.epochSecondUTC = epochSecondUTC; + this.nanoOfSecond = nano; + this.zoneOffsetSeconds = offsetSeconds; + this.zoneId = -1; + } + + @Override + public void writeDateTime( long epochSecondUTC, int nano, String zoneId ) + { + this.epochSecondUTC = epochSecondUTC; + this.nanoOfSecond = nano; + this.zoneId = TimeZoneMapping.map( zoneId ); + } + + @Override + protected Value assertCorrectType( Value value ) + { + if ( !(value instanceof DateTimeValue) ) + { + throw new IllegalArgumentException( + "Key layout does only support DateTimeValue, tried to create key from " + value ); + } + return value; + } +} diff --git a/community/kernel/src/test/java/org/neo4j/kernel/api/index/IndexProviderCompatibilityTestSuite.java b/community/kernel/src/test/java/org/neo4j/kernel/api/index/IndexProviderCompatibilityTestSuite.java index 615ae1091e31b..10f33c7b3003c 100644 --- a/community/kernel/src/test/java/org/neo4j/kernel/api/index/IndexProviderCompatibilityTestSuite.java +++ b/community/kernel/src/test/java/org/neo4j/kernel/api/index/IndexProviderCompatibilityTestSuite.java @@ -37,6 +37,7 @@ import org.neo4j.test.rule.fs.DefaultFileSystemRule; import org.neo4j.test.runner.ParameterizedSuiteRunner; import org.neo4j.values.storable.CoordinateReferenceSystem; +import org.neo4j.values.storable.DateTimeValue; import org.neo4j.values.storable.DateValue; import org.neo4j.values.storable.LocalDateTimeValue; import org.neo4j.values.storable.LocalTimeValue; @@ -96,7 +97,17 @@ public Compatibility( IndexProviderCompatibilityTestSuite testSuite, IndexDescri Arrays.asList( DateValue.epochDate( 2 ), LocalTimeValue.localTime( 100000 ), - LocalDateTimeValue.localDateTime( 2018, 3, 1, 13, 50, 42, 1337 ) ), + LocalDateTimeValue.localDateTime( 2018, 3, 1, 13, 50, 42, 1337 ), + DateTimeValue.datetime( 2014, 3, 25, 12, 45, 13, 7474, "UTC" ), + DateTimeValue.datetime( 2014, 3, 25, 12, 45, 13, 7474, "Europe/Stockholm" ), + DateTimeValue.datetime( 2014, 3, 25, 12, 45, 13, 7474, "+05:00" ), + DateTimeValue.datetime( 2015, 3, 25, 12, 45, 13, 7474, "+05:00" ), + DateTimeValue.datetime( 2014, 4, 25, 12, 45, 13, 7474, "+05:00" ), + DateTimeValue.datetime( 2014, 3, 26, 12, 45, 13, 7474, "+05:00" ), + DateTimeValue.datetime( 2014, 3, 25, 13, 45, 13, 7474, "+05:00" ), + DateTimeValue.datetime( 2014, 3, 25, 12, 46, 13, 7474, "+05:00" ), + DateTimeValue.datetime( 2014, 3, 25, 12, 45, 14, 7474, "+05:00" ), + DateTimeValue.datetime( 2014, 3, 25, 12, 45, 14, 7475, "+05:00" )), Arrays.asList( Values.pointValue( CoordinateReferenceSystem.Cartesian, 0, 0 ), Values.pointValue( CoordinateReferenceSystem.WGS84, 12.78, 56.7 ) ) ); @@ -107,7 +118,8 @@ public Compatibility( IndexProviderCompatibilityTestSuite testSuite, IndexDescri Arrays.asList( DateValue.epochDate( 42 ), LocalTimeValue.localTime( 2000 ), - LocalDateTimeValue.localDateTime( 2018, 2, 28, 11, 5, 1, 42 ) ), + LocalDateTimeValue.localDateTime( 2018, 2, 28, 11, 5, 1, 42 ), + DateTimeValue.datetime( 1999, 12, 31, 23, 59, 59, 123456789, "Europe/London" ) ), Arrays.asList( Values.pointValue( CoordinateReferenceSystem.Cartesian, 10, 10 ), Values.pointValue( CoordinateReferenceSystem.WGS84, 87.21, 7.65 ) ) );