Skip to content

[coverage] TELEMETRY-004: Synchronous Query Unconsumed Result Telemetry #533

Backlog

Description

@oss-engineer-bot

Expected behavior

Execute a large query, fetch no rows, close the result owner, and verify the kernel finalizes exactly one typed statement event.

Per the shared spec:

  • full assertion contract:
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
      condition: manifest_observed
  - telemetry_statement_field:
      path: sql_operation.execution_result
      present: false
      condition: not manifest_observed
  - telemetry_statement_field:
      path: sql_operation.result_latency
      present: false
  - 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

What this driver does

  • unconsumed sync execute reports n_operation_status_calls=0 / operation_status_latency_millis=0 after 5 successful GetStatementStatus requests on the wire

Reproduce

SELECT id FROM range(1000000)

About this finding

Candidate finding from the cross-driver coverage run for #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