You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gravitino.apache.org by "justinmclean (via GitHub)" <gi...@apache.org> on 2025/08/27 07:41:56 UTC
[I] [Improvement] Malformed SQL in softDeletePolicyVersionsByRetentionLine [gravitino]
justinmclean opened a new issue, #8307:
URL: https://github.com/apache/gravitino/issues/8307
### What would you like to be improved?
The IN clause is misising a closing bracket in softDeletePolicyVersionsByRetentionLine in core/src/main/java/org/apache/gravitino/storage/relational/mapper/provider/postgresql/PolicyVersionPostgreSQLProvider.java
### How should we improve?
Add a 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.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Improvement] Malformed SQL in softDeletePolicyVersionsByRetentionLine [gravitino]
Posted by "mchades (via GitHub)" <gi...@apache.org>.
mchades commented on issue #8307:
URL: https://github.com/apache/gravitino/issues/8307#issuecomment-3227691136
@justinmclean could you please point out the error, I don't see the IN clause in the function:
https://github.com/apache/gravitino/blob/c67a81ba9efbf831ac6f490dced48b1c0e396507/core/src/main/java/org/apache/gravitino/storage/relational/mapper/provider/postgresql/PolicyVersionPostgreSQLProvider.java#L55-L63
--
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: [I] [Improvement] Malformed SQL in softDeletePolicyVersionsByRetentionLine [gravitino]
Posted by "jerryshao (via GitHub)" <gi...@apache.org>.
jerryshao closed issue #8307: [Improvement] Malformed SQL in softDeletePolicyVersionsByRetentionLine
URL: https://github.com/apache/gravitino/issues/8307
--
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: [I] [Improvement] Malformed SQL in softDeletePolicyVersionsByRetentionLine [gravitino]
Posted by "jerryshao (via GitHub)" <gi...@apache.org>.
jerryshao commented on issue #8307:
URL: https://github.com/apache/gravitino/issues/8307#issuecomment-3227650278
@mchades please check this issue and fix 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: [I] [Improvement] Malformed SQL in softDeletePolicyVersionsByRetentionLine [gravitino]
Posted by "justinmclean (via GitHub)" <gi...@apache.org>.
justinmclean commented on issue #8307:
URL: https://github.com/apache/gravitino/issues/8307#issuecomment-3230577885
Sorry, there's an issue there, but I did not describe it correctly. PostgreSQL does not directly support the LIMIT clause within UPDATE or DELETE statements in the same way it does for SELECT statements. To do this, you would need to add an IN clause like:
```
+ " WHERE id IN (SELECT id FROM "
+ POLICY_VERSION_TABLE_NAME
+ " WHERE policy_id = #{policyId} AND version < #{versionRetentionLine}"
+ " AND deleted_at = 0 LIMIT #{limit})";
```
--
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