You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(csharp/src/Drivers/Databricks): Make Cloud Fetch options configurable at the connection level (#2691)
- Currently, cloud fetch enablement is only configurable at the
statement level, and this is not exposed to clients outside of
arrow-adbc repo
- Make these options configurable at the driver/connection level
Tested E2E by adding a log for the result set format and whether lz4
compression is enabled
- `{ "adbc.databricks.cloudfetch.enabled", "false" }`
- `DatabricksConnection.NewReader: resultFormat=ARROW_BASED_SET,
isLz4Compressed=True`
- `{ "adbc.databricks.cloudfetch.enabled", "false" },
{ "adbc.databricks.cloudfetch.lz4.enabled", "false" },`
- `DatabricksConnection.NewReader: resultFormat=ARROW_BASED_SET,
isLz4Compressed=False`
- empty
- `DatabricksConnection.NewReader: resultFormat=URL_BASED_SET,
isLz4Compressed=True`
- `{ "adbc.databricks.cloudfetch.lz4.enabled", "false" },`
- `DatabricksConnection.NewReader: resultFormat=URL_BASED_SET,
isLz4Compressed=False`
Also tested with
`dotnet test --filter "FullyQualifiedName~CloudFetchE2ETest"`
thrownewArgumentException($"Parameter '{DatabricksParameters.ApplySSPWithQueries}' value '{applySSPWithQueriesStr}' could not be parsed. Valid values are 'true' and 'false'.");
59
+
}
60
+
}
61
+
62
+
// Parse CloudFetch options from connection properties
thrownewArgumentException($"Parameter '{DatabricksParameters.UseCloudFetch}' value '{useCloudFetchStr}' could not be parsed. Valid values are 'true' and 'false'.");
thrownewArgumentException($"Parameter '{DatabricksParameters.CanDecompressLz4}' value '{canDecompressLz4Str}' could not be parsed. Valid values are 'true' and 'false'.");
thrownewArgumentException($"Parameter '{DatabricksParameters.MaxBytesPerFile}' value '{maxBytesPerFileStr}' could not be parsed. Valid values are positive integers.");
92
+
}
93
+
94
+
if(maxBytesPerFileValue<=0)
95
+
{
96
+
thrownewArgumentOutOfRangeException(
97
+
nameof(Properties),
98
+
maxBytesPerFileValue,
99
+
$"Parameter '{DatabricksParameters.MaxBytesPerFile}' value must be a positive integer.");
100
+
}
101
+
_maxBytesPerFile=maxBytesPerFileValue;
42
102
}
43
103
}
44
104
@@ -47,6 +107,21 @@ public DatabricksConnection(IReadOnlyDictionary<string, string> properties) : ba
0 commit comments