Skip to content

Commit 3710687

Browse files
Remove dead recordResultSetIteration overloads (#1232)
## Summary - Removes two unused `TelemetryHelper.recordResultSetIteration` overloads that became dead code after #1223 switched `DatabricksResultSet.next()` to use `cachedTelemetryCollector` directly - Removes the now-unused `DatabricksConnection` import - Supersedes #1210 NO_CHANGELOG=true ## Test plan - [x] `mvn compile` passes - [ ] CI checks pass 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 39d815e commit 3710687

1 file changed

Lines changed: 0 additions & 52 deletions

File tree

src/main/java/com/databricks/jdbc/telemetry/TelemetryHelper.java

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import static com.databricks.jdbc.common.DatabricksJdbcConstants.QUERY_TAGS;
44
import static com.databricks.jdbc.common.util.WildcardUtil.isNullOrEmpty;
55

6-
import com.databricks.jdbc.api.impl.DatabricksConnection;
76
import com.databricks.jdbc.api.internal.IDatabricksConnectionContext;
87
import com.databricks.jdbc.api.internal.IDatabricksStatementInternal;
98
import com.databricks.jdbc.common.DatabricksClientConfiguratorManager;
@@ -484,57 +483,6 @@ public static void setResultFormat(
484483
}
485484
}
486485

487-
/**
488-
* Records a result set iteration. Silently ignores errors.
489-
*
490-
* @param connectionContext The connection context
491-
* @param statementId The statement ID
492-
* @param chunkCount The total number of chunks
493-
* @param hasNext Whether there are more rows
494-
*/
495-
public static void recordResultSetIteration(
496-
IDatabricksConnectionContext connectionContext,
497-
String statementId,
498-
long chunkCount,
499-
boolean hasNext) {
500-
try {
501-
if (connectionContext != null) {
502-
TelemetryCollectorManager.getInstance()
503-
.getOrCreateCollector(connectionContext)
504-
.recordResultSetIteration(statementId, chunkCount, hasNext);
505-
}
506-
} catch (Exception e) {
507-
LOGGER.trace("Error recording result set iteration telemetry: {}", e.getMessage());
508-
}
509-
}
510-
511-
/**
512-
* Records a result set iteration from a parent statement. Extracts connection context safely and
513-
* silently ignores all errors.
514-
*
515-
* @param parentStatement The parent statement (can be null)
516-
* @param statementId The statement ID
517-
* @param chunkCount The total number of chunks (can be null)
518-
* @param hasNext Whether there are more rows
519-
*/
520-
public static void recordResultSetIteration(
521-
IDatabricksStatementInternal parentStatement,
522-
StatementId statementId,
523-
Long chunkCount,
524-
boolean hasNext) {
525-
try {
526-
if (parentStatement != null && chunkCount != null) {
527-
IDatabricksConnectionContext connectionContext =
528-
((DatabricksConnection) parentStatement.getStatement().getConnection())
529-
.getConnectionContext();
530-
recordResultSetIteration(
531-
connectionContext, statementId.toSQLExecStatementId(), chunkCount, hasNext);
532-
}
533-
} catch (Exception e) {
534-
LOGGER.trace("Error getting connection context for telemetry: {}", e.getMessage());
535-
}
536-
}
537-
538486
/**
539487
* Records get operation status latency. Silently ignores errors.
540488
*

0 commit comments

Comments
 (0)