You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gravitino.apache.org by "Spiritedswordsman (via GitHub)" <gi...@apache.org> on 2025/08/29 07:21:14 UTC
[PR] Fix softDeleteSQL to correctly calculate deleted_at in milliseconds [gravitino]
Spiritedswordsman opened a new pull request, #8354:
URL: https://github.com/apache/gravitino/pull/8354
Moved the * 1000 multiplication outside the extract(epoch ...) call.
The SQL now reads:
```SET deleted_at = floor(extract(epoch from current_timestamp) * 1000)```
This change ensures the deleted timestamp is properly recorded in milliseconds, providing accuracy required by downstream consumers.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#8347] fix(core): Fix softDeleteSQL to correctly calculate deleted_at in milliseconds [gravitino]
Posted by "jerryshao (via GitHub)" <gi...@apache.org>.
jerryshao merged PR #8354:
URL: https://github.com/apache/gravitino/pull/8354
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#8347] fix(core): Fix softDeleteSQL to correctly calculate deleted_at in milliseconds [gravitino]
Posted by "jerryshao (via GitHub)" <gi...@apache.org>.
jerryshao commented on code in PR #8354:
URL: https://github.com/apache/gravitino/pull/8354#discussion_r2321555686
##########
core/src/main/java/org/apache/gravitino/storage/relational/mapper/provider/postgresql/CatalogMetaPostgreSQLProvider.java:
##########
@@ -29,17 +29,17 @@ public class CatalogMetaPostgreSQLProvider extends CatalogMetaBaseSQLProvider {
public String softDeleteCatalogMetasByCatalogId(Long catalogId) {
return "UPDATE "
+ TABLE_NAME
- + " SET deleted_at = floor(extract(epoch from((current_timestamp -"
- + " timestamp '1970-01-01 00:00:00')*1000)))"
+ + " SET deleted_at = floor(extract(epoch from(current_timestamp -"
+ + " timestamp '1970-01-01 00:00:00'))*1000) "
Review Comment:
Shall we remove the trailing whitespace?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix softDeleteSQL to correctly calculate deleted_at in milliseconds [gravitino]
Posted by "justinmclean (via GitHub)" <gi...@apache.org>.
justinmclean commented on PR #8354:
URL: https://github.com/apache/gravitino/pull/8354#issuecomment-3238562738
Looks like you forgot a closing bracket
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#8347] fix(core): Fix softDeleteSQL to correctly calculate deleted_at in milliseconds [gravitino]
Posted by "yuqi1129 (via GitHub)" <gi...@apache.org>.
yuqi1129 commented on code in PR #8354:
URL: https://github.com/apache/gravitino/pull/8354#discussion_r2321600420
##########
core/src/main/java/org/apache/gravitino/storage/relational/mapper/provider/postgresql/CatalogMetaPostgreSQLProvider.java:
##########
@@ -29,17 +29,17 @@ public class CatalogMetaPostgreSQLProvider extends CatalogMetaBaseSQLProvider {
public String softDeleteCatalogMetasByCatalogId(Long catalogId) {
return "UPDATE "
+ TABLE_NAME
- + " SET deleted_at = floor(extract(epoch from((current_timestamp -"
- + " timestamp '1970-01-01 00:00:00')*1000)))"
+ + " SET deleted_at = floor(extract(epoch from(current_timestamp -"
+ + " timestamp '1970-01-01 00:00:00'))*1000) "
Review Comment:
OK, it's best to do so.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#8347] fix(core): Fix softDeleteSQL to correctly calculate deleted_at in milliseconds [gravitino]
Posted by "Spiritedswordsman (via GitHub)" <gi...@apache.org>.
Spiritedswordsman commented on PR #8354:
URL: https://github.com/apache/gravitino/pull/8354#issuecomment-3252042355
Heyy @yuqi1129 , I've been trying to find time this whole week but unable to do so, I would really appreciate your help, thank you :innocent:
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#8347] fix(core): Fix softDeleteSQL to correctly calculate deleted_at in milliseconds [gravitino]
Posted by "yuqi1129 (via GitHub)" <gi...@apache.org>.
yuqi1129 commented on PR #8354:
URL: https://github.com/apache/gravitino/pull/8354#issuecomment-3241026330
@Spiritedswordsman
Could you please resolve similar problems in other files, besides, it can be simplified as `floor(extract(epoch from now()) * 1000)`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#8347] fix(core): Fix softDeleteSQL to correctly calculate deleted_at in milliseconds [gravitino]
Posted by "Spiritedswordsman (via GitHub)" <gi...@apache.org>.
Spiritedswordsman commented on PR #8354:
URL: https://github.com/apache/gravitino/pull/8354#issuecomment-3240813007
Heyy guys, I fixed my mistake I did last time, sorry for inconvenience.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#8347] fix(core): Fix softDeleteSQL to correctly calculate deleted_at in milliseconds [gravitino]
Posted by "yuqi1129 (via GitHub)" <gi...@apache.org>.
yuqi1129 commented on PR #8354:
URL: https://github.com/apache/gravitino/pull/8354#issuecomment-3248364354
@Spiritedswordsman
Do you have time to continue with this PR? I can help you if you don't have time for it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix softDeleteSQL to correctly calculate deleted_at in milliseconds [gravitino]
Posted by "jerryshao (via GitHub)" <gi...@apache.org>.
jerryshao commented on PR #8354:
URL: https://github.com/apache/gravitino/pull/8354#issuecomment-3240719058
@yuqi1129 please take a look.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#8347] fix(core): Fix softDeleteSQL to correctly calculate deleted_at in milliseconds [gravitino]
Posted by "justinmclean (via GitHub)" <gi...@apache.org>.
justinmclean commented on PR #8354:
URL: https://github.com/apache/gravitino/pull/8354#issuecomment-3240917785
No problem at all
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org