>From Ritik Raj <[email protected]>:

Attention is currently required from: Wail Alkowaileet.

Ritik Raj has posted comments on this change by Ritik Raj. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20773?usp=email )

Change subject: [ASTERIXDB-3684][STO] Support temporal types in Column
......................................................................


Patch Set 6:

(6 comments)

Commit Message:

https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20773/comment/6b961fd9_0ecd6c0f?usp=email
 :
PS5, Line 23: DURATION and
            : INTERVAL
> I meant in the commit message 😊
Ah 😊, will update in whichever next patchset comes up.


File 
asterixdb/asterix-column/src/main/java/org/apache/asterix/column/bytes/encoder/ParquetDeltaBinaryPackingValuesWriterForInteger.java:

https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20773/comment/b711f154_13040c83?usp=email
 :
PS5, Line 120: 32
> Good catch!
Done


File 
asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/reader/ColumnValueReaderFactory.java:

https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20773/comment/90431e0c_474ca2cb?usp=email
 :
PS5, Line 89: case DATE:
            :                 return new DateValueReader();
            :             case TIME:
            :                 return new TimeValueReader();
            :             case YEARMONTHDURATION:
            :                 return new YearMonthDurationValueReader();
            :             case DATETIME:
            :                 return new DateTimeValueReader();
            :             case DAYTIMEDURATION:
            :                 return new DayTimeDurationValueReader();
            :             case DURATION:
            :                 return new DurationValueReader();
            :             case INTERVAL:
            :                 return new IntervalValueReader();
> somehow I thought we get error when creating a dataset with non-primitive 
> primary key, but on checki […]
Done


File 
asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/reader/value/temporal/DurationValueReader.java:

https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20773/comment/d5301103_c36054b3?usp=email
 :
PS5, Line 78:         // Compare using Asterix duration ordering: months first, 
then day-time milliseconds.
            :         IValueReference other = o.getBytes();
            :
            :         byte[] a = value.getByteArray();
            :         int ao = value.getStartOffset();
            :         int monthsA = IntegerPointable.getInteger(a, ao);
            :         long millisA = LongPointable.getLong(a, ao + 
Integer.BYTES);
            :
            :         byte[] b = other.getByteArray();
            :         int bo = other.getStartOffset();
            :         int monthsB = IntegerPointable.getInteger(b, bo);
            :         long millisB = LongPointable.getLong(b, bo + 
Integer.BYTES);
            :
            :         int cmp = Integer.compare(monthsA, monthsB);
            :         return cmp != 0 ? cmp : Long.compare(millisA, millisB);
> Ack!
Done


File 
asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/reader/value/temporal/IntervalValueReader.java:

https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20773/comment/981ebad3_e806fc72?usp=email
 :
PS5, Line 75: intervalTimeType
> Agreed on separating them into three types. […]
sure, I will draft a mail for the discussion.


File 
asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/DurationColumnValuesWriter.java:

https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20773/comment/c6c7019f_44e3aa5a?usp=email
 :
PS5, Line 55: * NOTE: Since the columnar page-zero filter stores only two 
8-byte longs, we cannot safely create an
            :  * order-preserving single-long min/max representation for 
DURATION. This writer therefore stores the values, but
            :  * uses a conservative filter that avoids pruning based on 
DURATION filters.
> I'm super oblivious to those temporal types (didn't work on them at all). […]
Yes, I understand, the types needed to comparable or atleast agree on a 
particular deterministic order.
The current ordering is based on months and then milliseconds for the DURATION.
eg:

```
FROM [
  { "id": "1", "name": "Z" , "d": duration("P2MT1M")},
  { "id": "2", "name": "kirk", "d": duration("P1MT1233412414124142M") }
] AS p
SELECT p
ORDER BY p.d DESC;
```

gives the following ordering

```
{"p":{"id":"1","name":"Z","d":"P2MT1M"}}
{"p":{"id":"2","name":"kirk","d":"P1M615227DT19H26M"}}
```

which might not be correct, but if this is agreed that it is the expected 
behavior/ordering, then having filter on months will be really helpful.



--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20773?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Change-Id: I1bdf63561cd5e7c73801380cf0a7c1b5be9c9248
Gerrit-Change-Number: 20773
Gerrit-PatchSet: 6
Gerrit-Owner: Ritik Raj <[email protected]>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Ritik Raj <[email protected]>
Gerrit-Reviewer: Wail Alkowaileet <[email protected]>
Gerrit-Attention: Wail Alkowaileet <[email protected]>
Gerrit-Comment-Date: Mon, 19 Jan 2026 06:15:08 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Wail Alkowaileet <[email protected]>
Comment-In-Reply-To: Ritik Raj <[email protected]>

Reply via email to