|
1 | 1 | /* |
2 | | - * Copyright 2024-present Alibaba Inc. |
| 2 | + * Copyright 2026-present Alibaba Inc. |
3 | 3 | * |
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | 5 | * you may not use this file except in compliance with the License. |
@@ -51,68 +51,69 @@ class ColumnarRowRef : public InternalRow { |
51 | 51 | } |
52 | 52 |
|
53 | 53 | int32_t GetFieldCount() const override { |
54 | | - return static_cast<int32_t>(ctx_->array_vec.size()); |
| 54 | + return static_cast<int32_t>(ctx_->array_ptrs.size()); |
55 | 55 | } |
56 | 56 |
|
57 | 57 | bool IsNullAt(int32_t pos) const override { |
58 | | - return ctx_->array_vec[pos]->IsNull(row_id_); |
| 58 | + return ctx_->array_ptrs[pos]->IsNull(row_id_); |
59 | 59 | } |
60 | 60 |
|
61 | 61 | bool GetBoolean(int32_t pos) const override { |
62 | | - return ColumnarUtils::GetGenericValue<arrow::BooleanType, bool>(ctx_->array_vec[pos], |
| 62 | + return ColumnarUtils::GetGenericValue<arrow::BooleanType, bool>(ctx_->array_ptrs[pos], |
63 | 63 | row_id_); |
64 | 64 | } |
65 | 65 |
|
66 | 66 | char GetByte(int32_t pos) const override { |
67 | | - return ColumnarUtils::GetGenericValue<arrow::Int8Type, char>(ctx_->array_vec[pos], row_id_); |
| 67 | + return ColumnarUtils::GetGenericValue<arrow::Int8Type, char>(ctx_->array_ptrs[pos], |
| 68 | + row_id_); |
68 | 69 | } |
69 | 70 |
|
70 | 71 | int16_t GetShort(int32_t pos) const override { |
71 | | - return ColumnarUtils::GetGenericValue<arrow::Int16Type, int16_t>(ctx_->array_vec[pos], |
| 72 | + return ColumnarUtils::GetGenericValue<arrow::Int16Type, int16_t>(ctx_->array_ptrs[pos], |
72 | 73 | row_id_); |
73 | 74 | } |
74 | 75 |
|
75 | 76 | int32_t GetInt(int32_t pos) const override { |
76 | | - return ColumnarUtils::GetGenericValue<arrow::Int32Type, int32_t>(ctx_->array_vec[pos], |
| 77 | + return ColumnarUtils::GetGenericValue<arrow::Int32Type, int32_t>(ctx_->array_ptrs[pos], |
77 | 78 | row_id_); |
78 | 79 | } |
79 | 80 |
|
80 | 81 | int32_t GetDate(int32_t pos) const override { |
81 | | - return ColumnarUtils::GetGenericValue<arrow::Date32Type, int32_t>(ctx_->array_vec[pos], |
| 82 | + return ColumnarUtils::GetGenericValue<arrow::Date32Type, int32_t>(ctx_->array_ptrs[pos], |
82 | 83 | row_id_); |
83 | 84 | } |
84 | 85 |
|
85 | 86 | int64_t GetLong(int32_t pos) const override { |
86 | | - return ColumnarUtils::GetGenericValue<arrow::Int64Type, int64_t>(ctx_->array_vec[pos], |
| 87 | + return ColumnarUtils::GetGenericValue<arrow::Int64Type, int64_t>(ctx_->array_ptrs[pos], |
87 | 88 | row_id_); |
88 | 89 | } |
89 | 90 |
|
90 | 91 | float GetFloat(int32_t pos) const override { |
91 | | - return ColumnarUtils::GetGenericValue<arrow::FloatType, float>(ctx_->array_vec[pos], |
| 92 | + return ColumnarUtils::GetGenericValue<arrow::FloatType, float>(ctx_->array_ptrs[pos], |
92 | 93 | row_id_); |
93 | 94 | } |
94 | 95 |
|
95 | 96 | double GetDouble(int32_t pos) const override { |
96 | | - return ColumnarUtils::GetGenericValue<arrow::DoubleType, double>(ctx_->array_vec[pos], |
| 97 | + return ColumnarUtils::GetGenericValue<arrow::DoubleType, double>(ctx_->array_ptrs[pos], |
97 | 98 | row_id_); |
98 | 99 | } |
99 | 100 |
|
100 | 101 | BinaryString GetString(int32_t pos) const override { |
101 | | - auto bytes = ColumnarUtils::GetBytes<arrow::StringType>(ctx_->array_vec[pos], row_id_, |
| 102 | + auto bytes = ColumnarUtils::GetBytes<arrow::StringType>(ctx_->array_ptrs[pos], row_id_, |
102 | 103 | ctx_->pool.get()); |
103 | 104 | return BinaryString::FromBytes(bytes); |
104 | 105 | } |
105 | 106 |
|
106 | 107 | std::string_view GetStringView(int32_t pos) const override { |
107 | | - return ColumnarUtils::GetView(ctx_->array_vec[pos], row_id_); |
| 108 | + return ColumnarUtils::GetView(ctx_->array_ptrs[pos], row_id_); |
108 | 109 | } |
109 | 110 |
|
110 | 111 | Decimal GetDecimal(int32_t pos, int32_t precision, int32_t scale) const override; |
111 | 112 |
|
112 | 113 | Timestamp GetTimestamp(int32_t pos, int32_t precision) const override; |
113 | 114 |
|
114 | 115 | std::shared_ptr<Bytes> GetBinary(int32_t pos) const override { |
115 | | - return ColumnarUtils::GetBytes<arrow::BinaryType>(ctx_->array_vec[pos], row_id_, |
| 116 | + return ColumnarUtils::GetBytes<arrow::BinaryType>(ctx_->array_ptrs[pos], row_id_, |
116 | 117 | ctx_->pool.get()); |
117 | 118 | } |
118 | 119 |
|
|
0 commit comments