davidhcoe commented on code in PR #2655:
URL: https://github.com/apache/arrow-adbc/pull/2655#discussion_r2055084479


##########
csharp/src/Drivers/BigQuery/BigQueryConnection.cs:
##########
@@ -337,33 +419,49 @@ private IArrowArray[] GetCatalogs(
             StringArray.Builder catalogNameBuilder = new StringArray.Builder();
             List<IArrowArray?> catalogDbSchemasValues = new 
List<IArrowArray?>();
             string catalogRegexp = PatternToRegEx(catalogPattern);
-            PagedEnumerable<ProjectList, CloudProject>? catalogs = 
this.client?.ListProjects();
+            PagedEnumerable<ProjectList, CloudProject>? catalogs;
+            List<string> projectIds = new List<string>();
 
-            if (catalogs != null)
+            try
             {
-                List<string> projectIds = catalogs.Select(x => 
x.ProjectId).ToList();
+                Func<Task<PagedEnumerable<ProjectList, CloudProject>?>> func = 
() => Task.Run(() =>
+                {
+                    // stick with this call because PagedAsyncEnumerable has 
different behaviors for selecting items
+                    return Client?.ListProjects();
+                });
 
-                if (this.includePublicProjectIds && 
!projectIds.Contains(publicProjectId))
-                    projectIds.Add(publicProjectId);
+                catalogs = 
ExecuteWithRetriesAsync<PagedEnumerable<ProjectList, 
CloudProject>?>(func).GetAwaiter().GetResult();
+
+                if (catalogs != null)
+                {
+                    projectIds = catalogs.Select(x => x.ProjectId).ToList();
+                }
+            }
+            catch
+            {
+                // TODO: Logging
+            }

Review Comment:
   removed



-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to