Skip to content

Commit 7735f15

Browse files
committed
Removed properties validation for polltime_ms
1 parent d1a9d27 commit 7735f15

File tree

2 files changed

+2
-28
lines changed

2 files changed

+2
-28
lines changed

csharp/src/Drivers/Databricks/DatabricksConnection.cs

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,6 @@ internal class DatabricksConnection : SparkHttpConnection
8484
// Identity federation client ID for token exchange
8585
private string? _identityFederationClientId;
8686

87-
// Async execution poll interval configuration
88-
private int _asyncExecPollIntervalMs = DatabricksConstants.DefaultAsyncExecPollIntervalMs;
89-
9087
// Heartbeat interval configuration
9188
private int _fetchHeartbeatIntervalSeconds = DatabricksConstants.DefaultOperationStatusPollingIntervalSeconds;
9289

@@ -417,23 +414,6 @@ private void ValidateProperties()
417414
_identityFederationClientId = identityFederationClientId;
418415
}
419416

420-
if (Properties.TryGetValue(ApacheParameters.PollTimeMilliseconds, out string? asyncExecPollIntervalStr))
421-
{
422-
if (!int.TryParse(asyncExecPollIntervalStr, out int asyncExecPollIntervalValue))
423-
{
424-
throw new ArgumentException($"Parameter '{ApacheParameters.PollTimeMilliseconds}' value '{asyncExecPollIntervalStr}' could not be parsed. Valid values are positive integers.");
425-
}
426-
427-
if (asyncExecPollIntervalValue <= 0)
428-
{
429-
throw new ArgumentOutOfRangeException(
430-
nameof(Properties),
431-
asyncExecPollIntervalValue,
432-
$"Parameter '{ApacheParameters.PollTimeMilliseconds}' value must be a positive integer.");
433-
}
434-
_asyncExecPollIntervalMs = asyncExecPollIntervalValue;
435-
}
436-
437417
if (Properties.TryGetValue(DatabricksParameters.FetchHeartbeatInterval, out string? fetchHeartbeatIntervalStr))
438418
{
439419
if (!int.TryParse(fetchHeartbeatIntervalStr, out int fetchHeartbeatIntervalValue))
@@ -529,13 +509,6 @@ protected internal override bool TrySetGetDirectResults(IRequest request)
529509
/// </summary>
530510
internal TNamespace? DefaultNamespace => _defaultNamespace;
531511

532-
/// <summary>
533-
/// Gets the async execution poll interval in milliseconds for query execution status checks.
534-
/// This is the Databricks-specific default (100ms) that will be used if the user hasn't
535-
/// explicitly configured the Apache base parameter.
536-
/// </summary>
537-
internal int AsyncExecPollIntervalMs => _asyncExecPollIntervalMs;
538-
539512
/// <summary>
540513
/// Gets the heartbeat interval in seconds for long-running operations.
541514
/// </summary>

csharp/src/Drivers/Databricks/DatabricksStatement.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,10 @@ public DatabricksStatement(DatabricksConnection connection)
7474

7575
runAsyncInThrift = connection.RunAsyncInThrift;
7676

77+
// Override the Apache base default (500ms) with Databricks-specific poll interval (100ms)
7778
if (!connection.Properties.ContainsKey(ApacheParameters.PollTimeMilliseconds))
7879
{
79-
SetOption(ApacheParameters.PollTimeMilliseconds, connection.AsyncExecPollIntervalMs.ToString());
80+
SetOption(ApacheParameters.PollTimeMilliseconds, DatabricksConstants.DefaultAsyncExecPollIntervalMs.ToString());
8081
}
8182
}
8283

0 commit comments

Comments
 (0)