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

vortex-data / vortex / 16421306329

21 Jul 2025 03:31PM UTC coverage: 81.519%. First build
16421306329

Pull #3949

github

web-flow
Merge 2970682e9 into 30fd768f7
Pull Request #3949: [wip] Add row_id support to DuckDB

58 of 91 new or added lines in 5 files covered. (63.74%)

42150 of 51706 relevant lines covered (81.52%)

170492.78 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