/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package io.trino.type;

import io.trino.spi.block.Block;
import io.trino.spi.block.BlockBuilder;
import io.trino.spi.type.SqlTimeWithTimeZone;

import static io.trino.spi.type.DateTimeEncoding.packTimeWithTimeZone;
import static io.trino.spi.type.DateTimeEncoding.unpackOffsetMinutes;
import static io.trino.spi.type.DateTimeEncoding.unpackTimeNanos;
import static io.trino.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE;

public class TestTimeWithTimeZoneType
        extends AbstractTestType
{
    public TestTimeWithTimeZoneType()
    {
        super(TIME_WITH_TIME_ZONE, SqlTimeWithTimeZone.class, createTestBlock());
    }

    public static Block createTestBlock()
    {
        BlockBuilder blockBuilder = TIME_WITH_TIME_ZONE.createBlockBuilder(null, 15);
        TIME_WITH_TIME_ZONE.writeLong(blockBuilder, packTimeWithTimeZone(1111, 0));
        TIME_WITH_TIME_ZONE.writeLong(blockBuilder, packTimeWithTimeZone(1111, 1));
        TIME_WITH_TIME_ZONE.writeLong(blockBuilder, packTimeWithTimeZone(1111, 2));
        TIME_WITH_TIME_ZONE.writeLong(blockBuilder, packTimeWithTimeZone(2222, 3));
        TIME_WITH_TIME_ZONE.writeLong(blockBuilder, packTimeWithTimeZone(2222, 4));
        TIME_WITH_TIME_ZONE.writeLong(blockBuilder, packTimeWithTimeZone(2222, 5));
        TIME_WITH_TIME_ZONE.writeLong(blockBuilder, packTimeWithTimeZone(2222, 6));
        TIME_WITH_TIME_ZONE.writeLong(blockBuilder, packTimeWithTimeZone(2222, 7));
        TIME_WITH_TIME_ZONE.writeLong(blockBuilder, packTimeWithTimeZone(3333, 8));
        TIME_WITH_TIME_ZONE.writeLong(blockBuilder, packTimeWithTimeZone(3333, 9));
        TIME_WITH_TIME_ZONE.writeLong(blockBuilder, packTimeWithTimeZone(4444, 10));
        return blockBuilder.build();
    }

    @Override
    protected Object getGreaterValue(Object value)
    {
        return packTimeWithTimeZone(unpackTimeNanos((Long) value) + 10, unpackOffsetMinutes((Long) value));
    }
}

@@ -1395,19 +1395,29 @@
 meZone(1
+_
 111
+_000_000L
 , 0));%0A 
@@ -1489,19 +1489,29 @@
 meZone(1
+_
 111
+_000_000L
 , 1));%0A 
@@ -1583,19 +1583,29 @@
 meZone(1
+_
 111
+_000_000L
 , 2));%0A 
@@ -1677,19 +1677,29 @@
 meZone(2
+_
 222
+_000_000L
 , 3));%0A 
@@ -1771,19 +1771,29 @@
 meZone(2
+_
 222
+_000_000L
 , 4));%0A 
@@ -1865,19 +1865,29 @@
 meZone(2
+_
 222
+_000_000L
 , 5));%0A 
@@ -1959,19 +1959,29 @@
 meZone(2
+_
 222
+_000_000L
 , 6));%0A 
@@ -2053,19 +2053,29 @@
 meZone(2
+_
 222
+_000_000L
 , 7));%0A 
@@ -2147,19 +2147,29 @@
 meZone(3
+_
 333
+_000_000L
 , 8));%0A 
@@ -2241,19 +2241,29 @@
 meZone(3
+_
 333
+_000_000L
 , 9));%0A 
@@ -2335,19 +2335,29 @@
 meZone(4
+_
 444
+_000_000L
 , 10));%0A

Fix test data to obey representation for precision