MCPcopy Create free account
hub / github.com/BlazingDB/blazingsql / build_custom_table

Function build_custom_table

engine/tests/cache_machine/cache_test.cpp:40–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40std::unique_ptr<ral::frame::BlazingTable> build_custom_table() {
41
42
43 cudf::size_type size = 10;
44
45 auto num_column_1 = make_col<int32_t>(size);
46 auto num_column_2 = make_col<int64_t>(size);
47 auto num_column_3 = make_col<float>(size);
48 auto num_column_4 = make_col<double>(size);
49
50 std::vector<std::unique_ptr<cudf::column>> columns;
51 columns.push_back(std::move(num_column_1));
52 columns.push_back(std::move(num_column_2));
53 columns.push_back(std::move(num_column_3));
54 columns.push_back(std::move(num_column_4));
55
56 cudf::test::strings_column_wrapper col2({"d", "e", "a", "d", "k", "d", "l", "a", "b", "c"}, {1, 0, 1, 1, 1, 1, 1, 1, 0, 1});
57
58 std::unique_ptr<cudf::column> str_col = std::make_unique<cudf::column>(std::move(col2));
59 columns.push_back(std::move(str_col));
60
61 std::vector<std::string> column_names = {"INT64", "INT32", "FLOAT64", "FLOAT32", "STRING"};
62
63 auto table = std::make_unique<cudf::table>(std::move(columns));
64 return std::make_unique<ral::frame::BlazingTable>(ral::frame::BlazingTable(std::move(table), column_names));
65}
66
67
68std::unique_ptr<ral::frame::BlazingTable> build_custom_one_column_table() {

Callers 1

TEST_FFunction · 0.70

Calls 1

BlazingTableClass · 0.50

Tested by

no test coverage detected