Skip to content

[coverage] TELEMETRY-001: Synchronous Query Full Consumption Telemetry #612

Done

Description

@oss-engineer-bot

Expected behavior

Connect with kernel telemetry explicitly enabled, execute and fully consume one million rows, then close the connection.

Per the shared spec:

  • result has exactly 1000000 row(s)
  • full assertion contract:
result:
- row_count: 1000000
- row:
    index: 0
    equals:
    - 0
- row:
    index: 999999
    equals:
    - 999999
protocol:
  sea:
  - telemetry_operation_count:
      operation_type: CREATE_SESSION
      equals: 1
  - telemetry_operation_count:
      operation_type: EXECUTE_STATEMENT
      equals: 1
  - telemetry_operation_count:
      operation_type: DELETE_SESSION
      equals: 1
  - telemetry_statement_field:
      path: sql_statement_id
      present: true
  - telemetry_statement_field:
      path: driver_connection_params.mode
      equals: SEA
  - telemetry_statement_field:
      path: sql_operation.statement_type
      equals: SQL
  - telemetry_statement_field:
      path: sql_operation.execution_result
      one_of:
      - INLINE_ARROW
      - EXTERNAL_LINKS
  - telemetry_statement_field:
      path: sql_operation.result_latency.result_set_ready_latency_millis
      min: 0
  - telemetry_statement_field:
      path: sql_statement_id
      equals_execute_statement_id: true
  - telemetry_statement_field:
      path: sql_operation.operation_detail.n_operation_status_calls
      equals: 0
      condition: status_requests == 0
  - telemetry_statement_field:
      path: sql_operation.operation_detail.n_operation_status_calls
      min: 1
      max: status_requests
      condition: status_requests > 0
  - telemetry_statement_field:
      path: sql_operation.operation_detail.operation_status_latency_millis
      equals: 0
      condition: status_requests == 0
  - telemetry_statement_field:
      path: sql_operation.operation_detail.operation_status_latency_millis
      min: 0
      condition: status_requests > 0
  - telemetry_statement_field:
      path: sql_operation.result_latency.result_set_consumption_latency_millis
      min: 0

What this driver does

  • SEA: kernel-backed sync execute polls GetStatementStatus inside wait_for_terminal without recording the polls: n_operation_status_calls=0 / operation_status_latency_millis=0 while the proxy saw successful status GETs
    • test: TestSynchronousQueryFullConsumptionTelemetry

Reproduce

SELECT id FROM range(1000000)

About this finding

Candidate finding from the cross-driver coverage run for databricks/databricks-sql-kernel#524. The test that found it is in https://github.com/databricks/databricks-driver-test/pull/2427, which is still in review. If that PR closes without merging, this issue no longer applies.

The spec describes what users of every driver should see. It doesn't ask this driver to copy another driver's implementation. If this driver gets the same user-visible result another way, or the spec asks for more than the product guarantees, say so on the coverage PR and the spec will change instead.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions