hubgeter commented on code in PR #57012:
URL: https://github.com/apache/doris/pull/57012#discussion_r2447629926
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/maxcompute/MaxComputeExternalCatalog.java:
##########
@@ -280,30 +298,59 @@ public List<String> listPartitionNames(String dbName,
String tbl) {
public List<String> listPartitionNames(String dbName, String tbl, long
skip, long limit) {
try {
- if (getClient().projects().exists(dbName)) {
- List<Partition> parts;
- if (limit < 0) {
- parts = getClient().tables().get(dbName,
tbl).getPartitions();
- } else {
- skip = skip < 0 ? 0 : skip;
- parts = new ArrayList<>();
- Iterator<Partition> it = getClient().tables().get(dbName,
tbl).getPartitionIterator();
- int count = 0;
- while (it.hasNext()) {
- if (count < skip) {
- count++;
- it.next();
- } else if (parts.size() >= limit) {
- break;
- } else {
- parts.add(it.next());
+ if (projectSchemaTable) {
+ if (getClient().schemas().exists(dbName)) {
+ List<Partition> parts;
+ if (limit < 0) {
+ parts = getClient().tables().get(defaultProject,
dbName, tbl).getPartitions();
Review Comment:
i add a McStructureHelper interface to simple the logical of getclient().xxx
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]