CurtHagenlocher commented on code in PR #3474:
URL: https://github.com/apache/arrow-adbc/pull/3474#discussion_r2376972678


##########
csharp/src/Drivers/Databricks/DatabricksStatement.cs:
##########
@@ -679,6 +697,61 @@ private static IArrowArray[] 
CreateColumnMetadataEmptyArray()
             ];
         }
 
+        /// <summary>
+        /// Parses a byte value that may include unit suffixes (B, KB, MB, GB).
+        /// </summary>
+        /// <param name="value">The value to parse, e.g., "300MB", "1024KB", 
"1073741824"</param>
+        /// <returns>The value in bytes</returns>
+        /// <exception cref="FormatException">Thrown when the value cannot be 
parsed</exception>
+        private static long ParseBytesWithUnits(string value)

Review Comment:
   Can we avoid having two copies of this code?



##########
csharp/src/Drivers/Databricks/DatabricksConnection.cs:
##########
@@ -61,8 +61,8 @@ internal class DatabricksConnection : SparkHttpConnection
 
         internal static TSparkGetDirectResults defaultGetDirectResults = new()
         {
-            MaxRows = 2000000,
-            MaxBytes = 404857600
+            MaxRows = 1000,
+            MaxBytes = DefaultMaxBytesPerFetchRequest 

Review Comment:
   After this change, the only use for `defaultGetDirectResults` is to supply a 
`MaxRows` to the `TSparkGetDirectResults` being constructed in 
`TrySetGetDirectResults`. Consider deleting this static field and replacing it 
with e.g. `const int DefaultMaxRowsPerFetchRequest = 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to