chore: [WRA-14] enhance test cases coverage#583
Conversation
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe 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
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. Comment |
There was a problem hiding this comment.
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_tableforeign 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.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ms to bids table schema
…ance feature checks
…for supabase-wrappers
…nresolved symbol management
…gflare schema fields
…ts for ClickHouse
…nd insertion in ClickHouse
…ving future insert/update/delete logic
…w test cases for timestamp fields
…use data types and updating related tests
There was a problem hiding this comment.
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
📒 Files selected for processing (16)
.cargo/config.toml.github/workflows/coverage.yml.github/workflows/test_supabase_wrappers.ymlsupabase-wrappers/src/interface.rssupabase-wrappers/src/qual.rswrappers/dockerfiles/logflare/data.jsonwrappers/dockerfiles/logflare/server.pywrappers/dockerfiles/s3/iceberg_seed.pywrappers/dockerfiles/s3vectors/server.pywrappers/src/fdw/airtable_fdw/tests.rswrappers/src/fdw/bigquery_fdw/tests.rswrappers/src/fdw/clickhouse_fdw/clickhouse_fdw.rswrappers/src/fdw/clickhouse_fdw/tests.rswrappers/src/fdw/logflare_fdw/tests.rswrappers/src/fdw/s3vectors_fdw/tests.rswrappers/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
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