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

The header file 'operator_typers.h' does not provide the specific definitions for the 'Input' and 'Output' structures. #402

Closed
ShoreFlower opened this issue Dec 23, 2023 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@ShoreFlower
Copy link

The header file 'operator_typers.h' does not provide the specific definitions for the 'Input' and 'Output' structures.

/** */
typedef struct Input Input_t;

/** */
typedef struct Output Output_t;

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Dec 23, 2023
@ShoreFlower
Copy link
Author

I think it should be this:

/** */
typedef struct Input{
Vec_uint8_t id;
Vec_uint8_t data;
} Input_t;

/** */
typedef struct Output{
Vec_uint8_t id;
Vec_uint8_t data;
} Output_t;

@haixuanTao
Copy link
Collaborator

Input and Output are defined as opaque type in C++. You can find there definition in:
input

#[derive_ReprC]
#[repr(opaque)]
#[derive(Debug)]
pub struct Input {
pub id: safer_ffi::String,
pub data_array: Option<FFI_ArrowArray>,
pub schema: FFI_ArrowSchema,
pub metadata: Metadata,
}

output

#[derive_ReprC]
#[repr(opaque)]
#[derive(Debug)]
pub struct Output {
pub id: safer_ffi::String,
pub data_array: FFI_ArrowArray,
pub schema: FFI_ArrowSchema,
pub metadata: Metadata,
}

This is this way as some of the types are Rust types

@phil-opp
Copy link
Collaborator

@ShoreFlower To access the id and data of inputs, you can use the dora_read_input_id and dora_read_data functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants