Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: provide detailed polars column metadata #245

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

brianheineman
Copy link
Contributor

@brianheineman brianheineman commented Dec 18, 2024

Addresses #240

For the given JSON:

{
  "type": "Feature",
  "geometry": {
    "type": "Point",
    "coordinates": [
      -104.820246,
      41.139981
    ]
  },
  "properties": {
    "name": "Center of Cheyenne, Wyoming"
  }
}

Prior to these changes, the column metadata was:

        Column        |   Type    | Not null | Default 
----------------------+-----------+----------+---------
 type                 | str       | Yes      |         
 geometry             | struct[2] | Yes      |         
 properties           | struct[1] | Yes      |         

With these changes, the column metadata is now:

        Column        |   Type    | Not null | Default 
----------------------+-----------+----------+---------
 type                 | str       | Yes      |         
 geometry             | struct[2] | Yes      |         
 geometry.type        | str       | Yes      |         
 geometry.coordinates | list[f64] | Yes      |         
 properties           | struct[1] | Yes      |         
 properties.name      | str       | Yes      |        

The coordinates can be retrieved with the following SQL:

SELECT
    geometry.coordinates[1] AS longitude,
    geometry.coordinates[2] AS latitude
FROM
    cheyenne

@github-actions github-actions bot added the enhancement New feature or request label Dec 18, 2024
Copy link

github-actions bot commented Dec 18, 2024

🐰 Bencher Report

Branchimprove-polars-metadata
Testbedlocalhost

⚠️ WARNING: No Threshold found!

Without a Threshold, no Alerts will ever be generated.

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds CLI flag.

Click to view all benchmark results
BenchmarkLatencynanoseconds (ns)
postgres-embedded📈 view plot
⚠️ NO THRESHOLD
829,180,000.00
postgresql-embedded📈 view plot
⚠️ NO THRESHOLD
839,600,000.00
rusqlite📈 view plot
⚠️ NO THRESHOLD
4,465,400.00
sqlite📈 view plot
⚠️ NO THRESHOLD
4,774,800.00
🐰 View full continuous benchmarking report in Bencher

Copy link

codecov bot commented Dec 18, 2024

Codecov Report

Attention: Patch coverage is 86.66667% with 4 lines in your changes missing coverage. Please review.

Project coverage is 93.62%. Comparing base (88742b8) to head (2077d65).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
rsql_drivers/src/polars/metadata.rs 86.66% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #245      +/-   ##
==========================================
- Coverage   93.64%   93.62%   -0.03%     
==========================================
  Files         108      108              
  Lines       13433    13453      +20     
==========================================
+ Hits        12580    12596      +16     
- Misses        853      857       +4     

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

@brianheineman brianheineman force-pushed the improve-polars-metadata branch from bf5e9f0 to 2077d65 Compare December 19, 2024 00:14
@brianheineman brianheineman merged commit 0ab0ec6 into main Dec 19, 2024
23 of 24 checks passed
@brianheineman brianheineman deleted the improve-polars-metadata branch December 19, 2024 01:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant