Skip to content

chore: [WRA-14] enhance test cases coverage#583

Merged
burmecia merged 17 commits intomainfrom
bo/chore/coverage-boost
Mar 5, 2026
Merged

chore: [WRA-14] enhance test cases coverage#583
burmecia merged 17 commits intomainfrom
bo/chore/coverage-boost

Conversation

@burmecia
Copy link
Member

@burmecia burmecia commented Mar 3, 2026

What kind of change does this PR introduce?

This PR is to improve test cases coverage.

What is the current behavior?

The current test cases coverage is about 76%, we need to increase it above 80%.

What is the new behavior?

Test cases coverage is over 80%.

Additional context

N/A

Copilot AI review requested due to automatic review settings March 3, 2026 23:02
@coderabbitai
Copy link

coderabbitai bot commented Mar 3, 2026

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Extended support for additional data types including char, int2, int4, int8, float4, float8, date, and timestamptz fields across multiple data source connectors.
    • Enhanced filtering capabilities for query endpoints with multi-criteria support.
  • Tests

    • Comprehensive test coverage additions for type conversion and serialization across various database adapters.
  • Chores

    • Updated build configurations to improve compatibility and suppress compiler warnings during compilation.

Walkthrough

The changes add many new primitive and temporal fields across mock servers and test fixtures (Airtable, Logflare, S3 Vectors, Logflare FDW, S3Vectors FDW, BigQuery/ClickHouse/Stripe FDW tests) and expand schemas and test data to exercise those types. CI/build config updates add Linux cargo target rustflags and RUSTFLAGS in workflows. supabase-wrappers gains extensive unit tests for Cell and qual parsing. ClickHouse FDW extends big-integer mapping/parsing. Logflare mock server adds a parameterized GET endpoint with multi-criteria filtering and router registration.

Sequence Diagram(s)

mermaid
sequenceDiagram
participant Client as Client
participant Server as LogflareMockServer
participant Data as DataSource
Client->>Server: GET /endpoint?endpoint=...&id=...&date_field=...&ts_field=...&tstz_field=...
Server->>Server: parse query params\nif no filters -> return full dataset
Server->>Data: load data (list or dict)
Server->>Server: matches(item) applies id,date,ts,tstz filters
Server->>Data: filter items per matches
Server->>Client: return filtered list or dict (or empty dict)

suggested labels: ci, s3vectors


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@burmecia burmecia marked this pull request as draft March 3, 2026 23:03
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves test coverage for the Airtable FDW by adding new PostgreSQL column types (char, smallint, integer, bigint, real, double precision, date, timestamptz) to both the foreign table schema definition and the mock server fixture data, along with a new SELECT * test to exercise deserialization of all columns together.

Changes:

  • New column types added to the airtable_table foreign table DDL in the test setup.
  • Corresponding field values for the new column types added to both mock data records in the Python mock server.
  • A new SELECT * query test added to verify that all new column types can be deserialized without error.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
wrappers/src/fdw/airtable_fdw/tests.rs Adds new columns to the foreign table DDL and a new SELECT * test asserting deserialization succeeds
wrappers/dockerfiles/airtable/server.py Adds corresponding mock field values for the new column types in both test records

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

burmecia and others added 16 commits March 4, 2026 10:07
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@burmecia burmecia marked this pull request as ready for review March 5, 2026 02:41
@burmecia burmecia requested a review from imor March 5, 2026 02:41
@burmecia burmecia changed the title chore: enhance test cases coverage chore: [WRA-14] enhance test cases coverage Mar 5, 2026
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@wrappers/src/fdw/clickhouse_fdw/clickhouse_fdw.rs`:
- Around line 818-823: In the Cell::I64 match arm where you convert signed i64
(variable v) into unsigned ClickHouse types (SqlType::UInt8/16/32/64 and their
Nullable variants) before creating a ChValue, add explicit bounds checks: first
reject any negative v (return an Err or appropriate conversion error) before any
unsigned cast, and for UInt8/UInt16/UInt32 also check v <= target_max (u8::MAX,
u16::MAX, u32::MAX) to avoid overflow; use is_nullable to decide between
Some(...) and direct values as currently done and keep error handling consistent
with the surrounding code (same error type/format used elsewhere in this
module).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 749c4156-893e-49e9-84ec-e8e4b0c25a2c

📥 Commits

Reviewing files that changed from the base of the PR and between 6f5d752 and e413ed2.

📒 Files selected for processing (16)
  • .cargo/config.toml
  • .github/workflows/coverage.yml
  • .github/workflows/test_supabase_wrappers.yml
  • supabase-wrappers/src/interface.rs
  • supabase-wrappers/src/qual.rs
  • wrappers/dockerfiles/logflare/data.json
  • wrappers/dockerfiles/logflare/server.py
  • wrappers/dockerfiles/s3/iceberg_seed.py
  • wrappers/dockerfiles/s3vectors/server.py
  • wrappers/src/fdw/airtable_fdw/tests.rs
  • wrappers/src/fdw/bigquery_fdw/tests.rs
  • wrappers/src/fdw/clickhouse_fdw/clickhouse_fdw.rs
  • wrappers/src/fdw/clickhouse_fdw/tests.rs
  • wrappers/src/fdw/logflare_fdw/tests.rs
  • wrappers/src/fdw/s3vectors_fdw/tests.rs
  • wrappers/src/fdw/stripe_fdw/tests.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • wrappers/src/fdw/airtable_fdw/tests.rs

@burmecia burmecia merged commit f56b281 into main Mar 5, 2026
8 checks passed
@burmecia burmecia deleted the bo/chore/coverage-boost branch March 5, 2026 04:51
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.

3 participants