Skip to content

Commit 6ffdf3f

Browse files
authored
fix: correct qualifier for INTERVAL datum with MINUTE_SECOND (#1771) (#1772)
1 parent 912ab8a commit 6ffdf3f

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,15 @@ Thank you to all who have contributed!
3232
### Deprecated
3333

3434
### Fixed
35+
- Specify the correct qualifier for `INTERVAL` datum with `MINUTE TO SECOND`
3536

3637
### Removed
3738

3839
### Security
3940

4041
### Contributors
4142
Thank you to all who have contributed!
43+
- @zyfy29
4244

4345
## [1.2.2](https://github.com/partiql/partiql-lang-kotlin/releases/tag/v1.2.2) - 2025-06-26
4446

partiql-cli/src/test/kotlin/org/partiql/cli/io/DatumWriterTextPrettyTests.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class DatumWriterTextPrettyTests {
6464
INTERVAL '1 2:3:4.50' DAY (2) TO SECOND (2),
6565
INTERVAL '1:2' HOUR (2) TO MINUTE,
6666
INTERVAL '1:2:3.40' HOUR (2) TO SECOND (2),
67-
INTERVAL '0:1:2.30' HOUR (2) TO SECOND (2),
67+
INTERVAL '1:2.30' MINUTE (2) TO SECOND (2),
6868
{
6969
'bar': [
7070
1,

partiql-spi/src/main/java/org/partiql/spi/value/Datum.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1118,7 +1118,7 @@ static Datum intervalMinuteSecond(int minutes, int seconds, int nanos, int preci
11181118
DatumIntervalHelpers.checkUsingPrecision(minutes, precision);
11191119
DatumIntervalHelpers.checkSeconds(seconds);
11201120
int newNanos = DatumIntervalHelpers.coerceNanos(nanos, fractionalPrecision);
1121-
return new DatumIntervalDayTime(0, 0, minutes, seconds, newNanos, precision, fractionalPrecision, IntervalCode.HOUR_SECOND);
1121+
return new DatumIntervalDayTime(0, 0, minutes, seconds, newNanos, precision, fractionalPrecision, IntervalCode.MINUTE_SECOND);
11221122
}
11231123

11241124
/**

0 commit comments

Comments
 (0)