NVIDIA / NVIDIA/cudf

`schema_tree_node` needs a constructor.

Open
#11,395 2 comments 0 reactions 0 assignees View on GitHub
0 - Waiting on Author cuIO libcudf proposal
Dominant language
C++
Stars
9.8k
Forks
1.1k
Avg merge
3d 6m
Merged PRs (30d)
278

Description

Nitpick: Looks like `schema_tree_node` needs a constructor. :]

I would've recommended aggregate initialization, but I'm not sure how appropriate it would be, since it's initializing parent members:
```suggestion
schema_tree_node col_schema {
.type = Type::BYTE_ARRAY,
.converted_type = ConvertedType::UNKNOWN,
.stats_dtype = statistics_dtype::dtype_byte_array,
.repetition_type = col_nullable ? OPTIONAL : REQUIRED,
.name = (schema[parent_idx].name == "list") ? "element" : col_meta.get_name(),
.parent_idx = parent_idx,
.leaf_column = col
};
```

My personal preference would be to avoid construct-then-initialize. But this is purely stylistic. Please feel free to ignore.

_Originally posted by @mythrocks in https://github.com/rapidsai/cudf/pull/11328#discussion_r932746165_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.