Skip to content

Conversation

@karolhor
Copy link

@karolhor karolhor commented Aug 26, 2025

Description

Fixes #26448

Release notes

(x) This is not user-visible or is docs only, and no release notes are required.

@cla-bot
Copy link

cla-bot bot commented Aug 26, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@karolhor karolhor force-pushed the fix/26448_replace_createTimestampType branch from 465e4b2 to ad473de Compare August 26, 2025 12:10
@cla-bot
Copy link

cla-bot bot commented Aug 26, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@ebyhr ebyhr self-requested a review August 26, 2025 21:59
Arguments.of(9, Long.MIN_VALUE, Long.MAX_VALUE, 1_000),
Arguments.of(10, Long.MIN_VALUE, Long.MAX_VALUE, 100),
Arguments.of(11, Long.MIN_VALUE, Long.MAX_VALUE, 10),
Arguments.of(12, Long.MIN_VALUE, Long.MAX_VALUE, 1));
Copy link
Member

@ebyhr ebyhr Aug 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parameter name (maxValue) and the actual value don't match.

Please change long to LongTimestampWithTimeZone here instead of test methods.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I modified the MethodSource: testPreviousNextValueEveryPrecisionDataProvider

@ParameterizedTest
@MethodSource("testPreviousNextValueEveryPrecisionDataProvider")
public void testPreviousValueEveryPrecision(int precision, long minValue, long maxValue, long step)
public void testPreviousValueEveryPrecision(int precision, long minValue, long maxValue, int step)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change to int seems not necessary here

Copy link
Member

@ebyhr ebyhr Aug 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change makes sense because the 2nd parameter of fromEpochMillisAndFraction is int.


assertThat(type.getPreviousValue(minValue))
long middleRangeEpochMillis = 123_456_789_000_000L;
int oneMsInPicos = 1_000_000_000;
Copy link
Contributor

@chenjian2664 chenjian2664 Aug 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename to picosOfMilli

@karolhor karolhor force-pushed the fix/26448_replace_createTimestampType branch from ad473de to 8591e9b Compare August 29, 2025 15:50
@cla-bot
Copy link

cla-bot bot commented Aug 29, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@karolhor karolhor force-pushed the fix/26448_replace_createTimestampType branch from 8591e9b to cc0b4b1 Compare August 29, 2025 15:53
@cla-bot
Copy link

cla-bot bot commented Aug 29, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@karolhor karolhor force-pushed the fix/26448_replace_createTimestampType branch from cc0b4b1 to c5d37b1 Compare August 29, 2025 15:54
@cla-bot
Copy link

cla-bot bot commented Aug 29, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@karolhor karolhor force-pushed the fix/26448_replace_createTimestampType branch from c5d37b1 to db4be17 Compare September 3, 2025 14:01
@cla-bot
Copy link

cla-bot bot commented Sep 3, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

1 similar comment
@cla-bot
Copy link

cla-bot bot commented Sep 4, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@karolhor karolhor force-pushed the fix/26448_replace_createTimestampType branch from ee43ce4 to d5adba7 Compare September 4, 2025 20:41
@cla-bot
Copy link

cla-bot bot commented Sep 4, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

return blockBuilder.buildValueBlock();
}

private static final int PICOS_OF_MILLI = 1_000_000_000;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: there exists the constant in Timestamps#PICOSECONDS_PER_MILLISECOND, we could static import here

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't know there is already a const for that. thanks

@cla-bot
Copy link

cla-bot bot commented Sep 8, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@karolhor karolhor force-pushed the fix/26448_replace_createTimestampType branch from 7775667 to 6df1fe9 Compare September 8, 2025 21:07
@cla-bot
Copy link

cla-bot bot commented Sep 8, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@karolhor karolhor force-pushed the fix/26448_replace_createTimestampType branch from 6df1fe9 to 5ec9d4b Compare September 17, 2025 19:22
@cla-bot cla-bot bot added the cla-signed label Sep 17, 2025
@karolhor
Copy link
Author

@ebyhr @chenjian2664 is there anything more I can improve in this ticket or it's ok now?

@ebyhr ebyhr force-pushed the fix/26448_replace_createTimestampType branch from 5ec9d4b to f54ea7d Compare September 19, 2025 06:16
@github-actions
Copy link

This pull request has gone a while without any activity. Ask for help on #core-dev on Trino slack.

@github-actions github-actions bot added the stale label Oct 10, 2025
@karolhor
Copy link
Author

Hi, is there something I can do with this PR?

@github-actions github-actions bot removed the stale label Nov 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

Replace createTimestampType with createTimestampWithTimeZoneType in TestLongTimestampWithTimeZoneType

3 participants