• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

vortex-data / vortex / 16416400962

21 Jul 2025 12:02PM UTC coverage: 81.576%. First build
16416400962

Pull #3949

github

web-flow
Merge 8fd8ea7ab into 301b27f5f
Pull Request #3949: [wip] Add row_id support to DuckDB

139 of 200 new or added lines in 11 files covered. (69.5%)

42124 of 51638 relevant lines covered (81.58%)

171468.07 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

94.44
/vortex-duckdb/src/duckdb/table_function/virtual_cols.rs
1
// SPDX-License-Identifier: Apache-2.0
2
// SPDX-FileCopyrightText: Copyright the Vortex contributors
3

4
use crate::duckdb::{LogicalType, TableFunction};
5
use crate::{cpp, wrapper};
6
use std::ffi::c_void;
7
use vortex::error::VortexExpect;
8

9
/// Native callback for the get_virtual_columns function.
10
pub(crate) unsafe extern "C" fn get_virtual_columns_callback<T: TableFunction>(
199✔
11
    bind_data: *mut c_void,
199✔
12
    result: cpp::duckdb_vx_tfunc_virtual_cols_result,
199✔
13
) {
199✔
14
    let bind_data =
199✔
15
        unsafe { bind_data.cast::<T::BindData>().as_ref() }.vortex_expect("bind_data null pointer");
199✔
16
    let mut result = unsafe { VirtualColsResult::borrow(result) };
199✔
17

18
    T::virtual_columns(bind_data, &mut result);
199✔
19
}
199✔
20

21
wrapper!(
22
    VirtualColsResult,
23
    cpp::duckdb_vx_tfunc_virtual_cols_result,
NEW
24
    |_| {}
×
25
);
26

27
impl VirtualColsResult {
28
    pub fn register(&self, column_idx: u64, name: &str, logical_type: &LogicalType) {
398✔
29
        unsafe {
30
            cpp::duckdb_vx_tfunc_virtual_cols_push(
398✔
31
                self.as_ptr(),
398✔
32
                column_idx as _,
398✔
33
                name.as_ptr().cast(),
398✔
34
                name.len() as _,
398✔
35
                logical_type.as_ptr(),
398✔
36
            )
37
        }
38
    }
398✔
39
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc