Skip to content

Add is_valid_url row-level check - #1457

Open
ghanse wants to merge 3 commits into
mainfrom
ghanse/is-valid-url
Open

Add is_valid_url row-level check#1457
ghanse wants to merge 3 commits into
mainfrom
ghanse/is-valid-url

Conversation

@ghanse

@ghanse ghanse commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Changes

Adds a new row-level check is_valid_url(column) that validates URL format against the RFC 3986 4.3 absolute-URI grammar. A scheme is required, so relative references such as /path or example.com are rejected. Reserved characters must be percent-encoded.

Linked issues

Tests

  • manually tested
  • added unit tests
  • added integration tests
  • added end-to-end tests
  • added performance tests

Documentation and Demos

  • added/updated demos
  • added/updated docs
  • added/updated agent skills

This pull request and its description were co-written by Isaac.

Adds a row-level check that validates URL format against the RFC 3986 §4.3
absolute-URI grammar: scheme ":" hier-part with an optional "?" query and
"#" fragment. A scheme is required, so relative references such as "/path" or
"example.com" are rejected, and reserved characters must be percent-encoded to be
accepted inside a path, query, or fragment. Follows the existing DQPattern
approach used by is_valid_email and is_valid_ipv4_address, so the check itself is
a thin _matches_pattern call.

Any syntactically valid scheme is accepted, which keeps non-network URLs such as
s3://, ftp://, mailto: and urn: valid alongside http:// and https://. Two
consequences are documented in the docstring and the reference table: the check
validates URL *syntax* and not safety, so script-bearing schemes
(javascript:alert(1)) and inline data: payloads pass and it must not be used to
sanitize untrusted input; and RFC 3986 permits an empty host, so file:///path
passes.

The pattern is anchored with \A...\z rather than ^...$ so that a value with a
trailing newline is rejected under Java regex semantics, consistent with the fix
in issue #1440. Every repetition in the pattern is over alternatives with
disjoint first characters, so there is no catastrophic backtracking; this was
verified against pathological multi-kilobyte inputs.
@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.14%. Comparing base (6275ec9) to head (917cbec).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1457      +/-   ##
==========================================
- Coverage   93.55%   92.14%   -1.41%     
==========================================
  Files         133      141       +8     
  Lines       12544    13591    +1047     
  Branches        0      151     +151     
==========================================
+ Hits        11735    12524     +789     
- Misses        809      999     +190     
- Partials        0       68      +68     
Flag Coverage Δ
anomaly 51.98% <92.85%> (+0.04%) ⬆️
anomaly-serverless 51.99% <92.85%> (+0.04%) ⬆️
integration ?
integration-serverless 48.68% <7.14%> (+0.69%) ⬆️
mcp 76.96% <ø> (?)
unit 65.03% <92.85%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

✅ 988/988 passed, 2 flaky, 42 skipped, 5h20m40s total

Flaky tests:

  • 🤪 test_generate_dq_rules_ai_assisted_with_custom_functions (35.262s)
  • 🤪 test_generate_dq_rules_ai_assisted_with_is_not_equal_to_str (23.284s)

Running from acceptance #5626

@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

❌ 1 failed, 29m2s total

❌ test_mcp_server_end_to_end: requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) (29m1.838s)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
18:04 INFO [databricks.sdk] Using Databricks Metadata Service authentication
[gw3] linux -- Python 3.12.3 /home/runner/work/dqx/dqx/.venv/bin/python
18:04 INFO [databricks.sdk] Using Databricks Metadata Service authentication
18:07 INFO [databricks.sdk] Using Databricks Metadata Service authentication
18:30 INFO [databricks.sdk] Using Databricks Metadata Service authentication
18:31 INFO [databricks.sdk] Using Databricks Metadata Service authentication
18:31 INFO [databricks.sdk] Using Databricks Metadata Service authentication
18:32 INFO [databricks.sdk] Using Databricks Metadata Service authentication
18:32 INFO [databricks.sdk] Using Databricks Metadata Service authentication
18:32 INFO [databricks.sdk] Using Databricks Metadata Service authentication
18:04 INFO [databricks.sdk] Using Databricks Metadata Service authentication
18:07 INFO [databricks.sdk] Using Databricks Metadata Service authentication
18:30 INFO [databricks.sdk] Using Databricks Metadata Service authentication
18:31 INFO [databricks.sdk] Using Databricks Metadata Service authentication
18:31 INFO [databricks.sdk] Using Databricks Metadata Service authentication
18:32 INFO [databricks.sdk] Using Databricks Metadata Service authentication
18:32 INFO [databricks.sdk] Using Databricks Metadata Service authentication
18:32 INFO [databricks.sdk] Using Databricks Metadata Service authentication
[gw3] linux -- Python 3.12.3 /home/runner/work/dqx/dqx/.venv/bin/python

Running from mcp #375

@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

✅ 195/195 passed, 1 skipped, 7h1m32s total

Running from anomaly #1740

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant