23 #include <type_traits>
33 #include "../Shared/sqltypes_lite.h"
35 #if !(defined(__CUDACC__) || defined(NO_BOOST))
36 #include "../Shared/DateTimeParser.h"
40 #include "../Shared/InlineNullValues.h"
41 #include "../Shared/funcannotations.h"
47 #endif // #ifndef UDF_COMPILED
48 #endif // #ifndef __CUDACC__
50 #include "../Geospatial/CompressionRuntime.h"
54 #define EXTENSION_INLINE_HOST extern "C" RUNTIME_EXPORT ALWAYS_INLINE HOST
55 #define EXTENSION_NOINLINE_HOST extern "C" RUNTIME_EXPORT NEVER_INLINE HOST
57 #define EXTENSION_INLINE extern "C" RUNTIME_EXPORT ALWAYS_INLINE DEVICE
58 #define EXTENSION_NOINLINE extern "C" RUNTIME_EXPORT NEVER_INLINE DEVICE
59 #define TEMPLATE_INLINE ALWAYS_INLINE DEVICE
60 #define TEMPLATE_NOINLINE NEVER_INLINE DEVICE
63 int64_t element_size);
68 #define FUNC_NAME (std::string(__func__).substr(0, std::string(__func__).find("__")))
70 #define ERROR_STRING(MSG) \
71 (std::string(__FILE__).substr(std::string(__FILE__).rfind("/") + 1) + ":" + \
72 std::to_string(__LINE__) + " " + FUNC_NAME + ": " + MSG) \
74 #define TABLE_FUNCTION_ERROR(MSG) table_function_error(ERROR_STRING(MSG))
75 #define ERROR_MESSAGE(MSG) error_message(ERROR_STRING(MSG))
76 #define SUCCESS table_function_success_code()
80 int64_t output_item_values_total_number);
83 int64_t output_array_values_total_number);
88 int64_t output_array_values_total_number);
92 int64_t output_item_values_total_number);
103 const uint8_t* raw_bytes,
104 const size_t num_bytes,
109 const uint8_t*& raw_bytes,
139 #define GET_DICT_DB_ID(mgr, arg_idx) (mgr.getDictDbId(__func__, arg_idx))
141 #define GET_DICT_ID(mgr, arg_idx) (mgr.getDictId(__func__, arg_idx))
150 const char* func_name,
154 const char* func_name,
170 const int64_t expected_numel,
194 const int64_t expected_numel,
223 operator int32_t()
const {
233 return value == inline_int_null_value<int32_t>();
241 return value == other;
245 return value == other;
264 return value < other;
268 return value < other;
284 null_val.
value = inline_int_null_value<int32_t>();
299 std::string
getString(int32_t db_id, int32_t dict_id, int32_t string_id) {
301 reinterpret_cast<int8_t*>(
this), db_id, dict_id, string_id);
306 reinterpret_cast<int8_t*>(
this), func_name, arg_idx);
309 int32_t
getDictId(
const char* func_name,
size_t arg_idx) {
311 reinterpret_cast<int8_t*>(
this), func_name, arg_idx);
316 reinterpret_cast<int8_t*>(
this), db_id, dict_id, str);
319 int8_t*
makeBuffer(int64_t element_count, int64_t element_size) {
321 reinterpret_cast<int8_t*>(
this), element_count, element_size);
328 template <
typename T>
330 if constexpr (std::is_same<T, int8_t>::value) {
332 }
else if constexpr (std::is_same<T, int16_t>::value) {
334 }
else if constexpr (std::is_same<T, int32_t>::value) {
336 }
else if constexpr (std::is_same<T, int64_t>::value) {
338 }
else if constexpr (std::is_same<T, float>::value) {
340 }
else if constexpr (std::is_same<T, double>::value) {
342 }
else if constexpr (std::is_same<T, bool>::value) {
345 throw std::runtime_error(
"Unsupported TableFunctionMetadataType");
362 int64_t output_array_values_total_number) {
364 reinterpret_cast<int8_t*>(
this), index, output_array_values_total_number);
368 int64_t output_item_values_total_number) {
370 reinterpret_cast<int8_t*>(
this), index, output_item_values_total_number);
374 if (!output_allocations_disabled) {
387 template <
typename T>
391 reinterpret_cast<const uint8_t*
>(&value),
393 get_metadata_type<T>());
396 template <
typename T>
398 const uint8_t* raw_data{};
402 reinterpret_cast<int8_t*>(
this), key.c_str(), raw_data, num_bytes, value_type);
403 if (
sizeof(
T) != num_bytes) {
404 throw std::runtime_error(
"Size mismatch for Table Function Metadata '" + key +
"'");
406 if (get_metadata_type<T>() != value_type) {
407 throw std::runtime_error(
"Type mismatch for Table Function Metadata '" + key +
"'");
409 std::memcpy(&value, raw_data, num_bytes);
420 reinterpret_cast<int8_t*>(
this), db_id, dict_id));
422 std::string
getString(int32_t db_id, int32_t dict_id, int32_t string_id) {
424 reinterpret_cast<int8_t*>(
this), db_id, dict_id, string_id);
428 reinterpret_cast<int8_t*>(
this), db_id, dict_id, str);
430 int8_t*
makeBuffer(int64_t element_count, int64_t element_size) {
432 reinterpret_cast<int8_t*>(
this), element_count, element_size);
439 result +=
"UNINITIALIZED";
444 #endif // HAVE_TOSTRING
445 bool output_allocations_disabled{
false};
448 #endif // #ifndef UDF_COMPILED
449 #endif // #ifndef __CUDACC__
452 #define NESTED_ARRAY_NDIM 4
454 #define IS_VALUE_TYPE(T) \
455 (std::is_scalar<T>::value || std::is_same<T, TextEncodingDict>::value || \
456 std::is_same<T, Geo::Point2D>::value)
458 namespace flatbuffer {
459 template <
typename T>
469 template <
typename T>
480 template <
typename M>
485 (std::is_same<TableFunctionManager, M>::value) ||
487 (std::is_same<RowFunctionManager, M>::value),
488 "M must be a TableFunctionManager or RowFunctionManager");
490 ptr_ =
reinterpret_cast<T*
>(mgr.makeBuffer(size, static_cast<int64_t>(
sizeof(
T))));
495 #endif // #ifndef __CUDACC__
503 ptr_ =
reinterpret_cast<T*
>(
527 static_assert(!std::is_same<T, TextEncodingNone>::value);
529 if (index < static_cast<unsigned int>(
size_)) {
539 static_assert(!std::is_same<T, TextEncodingNone>::value);
547 static_assert(!std::is_same<T, TextEncodingNone>::value);
561 if constexpr (std::is_same<T, TextEncodingNone>::value) {
564 return inline_null_value<T>();
576 for (int64_t i = 0; i <
size_; i++) {
577 if ((*
this)[i] != other[i]) {
590 for (int64_t i = 0; i <
size_; i++) {
595 }
else if (i > 8 && i < size_ - 2) {
618 :
ptr_(const_cast<char*>(c_str)),
size_(strlen(c_str)) {}
620 template <
typename M>
624 (std::is_same<TableFunctionManager, M>::value) ||
626 (std::is_same<RowFunctionManager, M>::value),
627 "M must be a TableFunctionManager or RowFunctionManager");
628 size_ = str.length();
632 int8_t* buffer = mgr.makeBuffer(
size_, static_cast<int64_t>(
sizeof(
char)));
633 ptr_ =
reinterpret_cast<char*
>(buffer);
634 strcpy(
ptr_, str.c_str());
638 operator std::string()
const {
651 for (
int i = 0; i <
size_; i++) {
652 if (rhs[i] ==
'\0' ||
ptr_[i] != rhs[i]) {
656 return rhs[
size_] ==
'\0';
658 return strcmp(
ptr_, rhs) == 0;
666 for (
int i = 0; i <
size_; i++) {
667 if ((*
this)[i] != rhs[i]) {
708 #if !(defined(__CUDACC__) || defined(NO_BOOST))
710 time = dateTimeParse<kTIMESTAMP>(str, 9);
716 if (other.
time > 0) {
717 if (
time > (std::numeric_limits<int64_t>::max() - other.
time)) {
718 throw std::underflow_error(
"Underflow in Timestamp addition!");
721 if (
time < (std::numeric_limits<int64_t>::min() - other.
time)) {
722 throw std::overflow_error(
"Overflow in Timestamp addition!");
731 if (other.
time > 0) {
732 if (
time < (std::numeric_limits<int64_t>::min() + other.
time)) {
733 throw std::underflow_error(
"Underflow in Timestamp substraction!");
736 if (
time > (std::numeric_limits<int64_t>::max() + other.
time)) {
737 throw std::overflow_error(
"Overflow in Timestamp substraction!");
746 if (other.
time == 0) {
747 throw std::runtime_error(
"Timestamp division by zero!");
755 int64_t overflow_test =
static_cast<int64_t
>(
time) * static_cast<int64_t>(multiplier);
756 if (
time != 0 && overflow_test /
time != static_cast<int64_t>(multiplier)) {
757 throw std::overflow_error(
"Overflow in Timestamp multiplication!");
850 return Timestamp(inline_int_null_value<int64_t>());
879 throw std::runtime_error(
"Timestamp division by zero!");
884 (timeval < 0 && end.time > begin.
time)) {
893 throw std::overflow_error(
"Overflow in INTERVAL precision conversion!");
897 return diff / asNanoSecs;
926 (timeval < 0 && end.time > begin.
time)) {
939 return interval + *
this;
944 return interval + *
this;
1086 #ifndef UDF_COMPILED
1089 template <
typename T>
1090 static DEVICE __constant__
T Column_null_value;
1093 template <
typename T>
1101 #ifndef UDF_COMPILED
1105 #endif // #ifndef UDF_COMPILED
1106 #endif // #ifndef __CUDACC__
1111 throw std::runtime_error(
"column buffer index is out of range");
1113 auto& null_value = Column_null_value<T>;
1139 memcpy(
ptr_, &other[0], other.
size() *
sizeof(
T));
1141 throw std::runtime_error(
"cannot copy assign columns with different sizes");
1145 for (
unsigned int i = 0; i <
size(); i++) {
1155 #ifdef HAVE_TOSTRING
1163 namespace flatbuffer {
1217 template <
typename RowType,
typename RowStruct>
1229 auto status = m.isNull(index, is_null);
1231 if (status != FlatBufferManager::Status::Success) {
1232 throw std::runtime_error(
"isNull failed: " + ::
toString(status));
1246 auto status = m.setNull(index);
1248 if (status != FlatBufferManager::Status::Success) {
1249 throw std::runtime_error(
"setNull failed: " + ::
toString(status));
1262 return getItem(static_cast<int64_t>(index));
1267 return (*
this)[index];
1272 RowType this_item =
getItem(index);
1278 RowType this_item =
getItem(index);
1286 return m.getValuesCount();
1290 RowType this_item =
getItem(index);
1295 RowType this_item =
getItem(index);
1301 auto result = (*this)[index];
1302 if (extra_numel >= 0) {
1303 result.extend(
nullptr, extra_numel,
false);
1310 const auto* ti =
reinterpret_cast<const SQLTypeInfoLite*
>(m.get_user_data_buffer());
1311 if (ti ==
nullptr) {
1313 throw std::runtime_error(::
typeName(
this) +
1314 " getTypeInfo failed: no user data buffer");
1320 #ifdef HAVE_FLATBUFFER_TOSTRING
1329 template <
typename ItemType>
1348 if (status != FlatBufferManager::Status::Success) {
1350 throw std::runtime_error(::
typeName(
this) +
" size failed: getLength failed with " +
1358 size_t size(
const int64_t index)
const {
1363 int64_t& nof_values,
1365 bool require_1d_item =
true)
const {
1368 getRawBuffer(_values, nof_values, value_size, is_null, require_1d_item);
1369 values =
reinterpret_cast<ItemType*
>(_values);
1373 int64_t& nof_values,
1376 bool require_1d_item =
true)
const {
1384 throw std::runtime_error(::
typeName(
this) +
1385 " getValuesBuffer failed: expected scalar type but got " +
1393 if (status != FlatBufferManager::Status::Success) {
1395 throw std::runtime_error(::
typeName(
this) +
1396 " getValuesBuffer failed: getItem returned " +
1400 if (require_1d_item && item.
nof_sizes != 0) {
1402 throw std::runtime_error(::
typeName(
this) +
1403 " &getValuesBuffer failed: expected 1-D item");
1409 value_size = m.getValueSize();
1419 throw std::runtime_error(::
typeName(
this) +
1420 " &getValue failed: expected scalar type but got " +
1430 throw std::runtime_error(::
typeName(
this) +
1431 " &getValue failed: expected non-null item ");
1434 if (index < 0 || index >= nof_values) {
1436 throw std::runtime_error(
1438 ") is out of range, expected 0 <= index < " +
std::to_string(nof_values));
1441 return values[index];
1450 const ItemType
getItem(
const int64_t index)
const {
1455 for (
size_t i = 0; i <
n_; i++) {
1467 auto status = m.isNull(
index_[0], is_null);
1469 if (status != FlatBufferManager::Status::Success) {
1470 throw std::runtime_error(::
typeName(
this) +
"isNull failed: isNull returned " +
1482 for (
size_t i = 0; i <
n_; i++) {
1483 tmp_index[i] =
index_[i];
1485 tmp_index[
n_] = index;
1489 if (status != FlatBufferManager::Status::Success) {
1490 throw std::runtime_error(::
typeName(
this) +
1491 "isNull(index) failed: isNull returned " +
1502 throw std::runtime_error(::
typeName(
this) +
1503 " extend failed: expected single index, got " +
1510 status = m.setItem(
index_[0], data, size);
1511 if (status != FlatBufferManager::Status::Success) {
1513 throw std::runtime_error(
1515 " extend failed: setItem failed with: " + ::
toString(status));
1519 status = m.concatItem(
index_[0], data, size);
1520 if (status != FlatBufferManager::Status::Success) {
1522 throw std::runtime_error(
1524 " extend failed: concatItem failed with: " + ::
toString(status));
1534 throw std::runtime_error(::
typeName(
this) +
1535 "extend failed: expected single index, got " +
1542 if (status != FlatBufferManager::Status::Success) {
1544 throw std::runtime_error(::
typeName(
this) +
" extend failed: getItem raised " +
1551 if (status != FlatBufferManager::Status::Success) {
1553 throw std::runtime_error(::
typeName(
this) +
" extend failed: setItem raised " +
1559 if (status != FlatBufferManager::Status::Success) {
1561 throw std::runtime_error(::
typeName(
this) +
1562 " extend failed: concatItem raised " +
1585 const auto* ti =
reinterpret_cast<const SQLTypeInfoLite*
>(m.get_user_data_buffer());
1586 if (ti ==
nullptr) {
1588 throw std::runtime_error(::
typeName(
this) +
1589 " getTypeInfo failed: user data buffer is null");
1595 #ifdef HAVE_TOSTRING
1598 for (
size_t i = 0; i <
n_; i++) {
1614 extend(reinterpret_cast<const int8_t*>(other.data()),
1615 static_cast<int32_t>(other.size()),
1621 extend(reinterpret_cast<const int8_t*>(other.data()),
1622 static_cast<int32_t>(other.size()),
1639 result.assign(reinterpret_cast<const char*>(values), static_cast<size_t>(nof_values));
1645 reinterpret_cast<const int8_t*>(s.data()), static_cast<int32_t>(s.size()),
true);
1651 reinterpret_cast<const int8_t*>(s.data()), static_cast<int32_t>(s.size()),
false);
1661 template <
typename T>
1662 struct Array :
public NestedArray<T> {
1672 reinterpret_cast<const int8_t*>(s.data()), static_cast<int32_t>(s.size()),
true);
1678 reinterpret_cast<const int8_t*>(s.data()), static_cast<int32_t>(s.size()),
false);
1685 return getItem(static_cast<int64_t>(index));
1695 double x{std::numeric_limits<double>::quiet_NaN()};
1696 double y{std::numeric_limits<double>::quiet_NaN()};
1698 #ifdef HAVE_TOSTRING
1714 const int64_t index,
1715 const bool is_geoint) {
1718 reinterpret_cast<const int32_t*>(data)[index]);
1720 return reinterpret_cast<const double*
>(data)[index];
1725 const int64_t index,
1726 const bool is_geoint) {
1729 reinterpret_cast<const int32_t*>(data)[index + 1]);
1731 return reinterpret_cast<const double*
>(data)[index + 1];
1736 const int64_t index,
1737 const bool is_geoint,
1738 const int32_t input_srid,
1739 const int32_t output_srid) {
1741 if (input_srid == output_srid || output_srid == 0) {
1743 }
else if (input_srid == 4326 && output_srid == 900913) {
1748 throw std::runtime_error(
"decompress_x_coord: unhandled geo transformation from " +
1757 const int64_t index,
1758 const bool is_geoint,
1759 const int32_t input_srid,
1760 const int32_t output_srid) {
1762 if (input_srid == output_srid || output_srid == 0) {
1764 }
else if (input_srid == 4326 && output_srid == 900913) {
1766 y = 6378136.99911 * log(tan(.00872664626 * y + .785398163397));
1769 throw std::runtime_error(
"decompress_y_coord: unhandled geo transformation from " +
1778 const int64_t index,
1779 const int32_t input_srid,
1780 const int32_t output_srid,
1781 const bool is_geoint) {
1789 template <
typename CT>
1791 const int64_t nof_points,
1792 const bool is_geoint,
1793 std::vector<CT>&
result) {
1794 result.reserve(2 * nof_points);
1796 if constexpr (std::is_same<CT, double>::value) {
1797 for (int64_t i = 0; i < nof_points; i++) {
1802 const int32_t* buf =
reinterpret_cast<const int32_t*
>(points_buf);
1803 result.assign(buf, buf + 2 * nof_points);
1806 const double* buf =
reinterpret_cast<const double*
>(points_buf);
1807 if constexpr (std::is_same<CT, double>::value) {
1808 result.assign(buf, buf + 2 * nof_points);
1810 for (int64_t i = 0; i < nof_points; i++) {
1820 const bool is_geoint) {
1821 int64_t nofpoints = size / (is_geoint ?
sizeof(int32_t) * 2 :
sizeof(
double) * 2);
1822 std::vector<int32_t>
result;
1823 result.reserve(2 * nofpoints);
1825 const int32_t* buf =
reinterpret_cast<const int32_t*
>(data);
1826 result.assign(buf, buf + 2 * nofpoints);
1828 const double* buf =
reinterpret_cast<const double*
>(data);
1829 for (int64_t i = 0; i < nofpoints; i++) {
1839 const bool is_geoint) {
1840 int64_t nofpoints = size / (is_geoint ?
sizeof(int32_t) * 2 :
sizeof(
double) * 2);
1841 std::vector<double>
result;
1842 result.reserve(2 * nofpoints);
1843 for (int64_t i = 0; i < nofpoints; i++) {
1851 std::vector<int32_t>
result;
1852 const size_t nofpoints = coords.size() / 2;
1853 result.reserve(coords.size());
1854 const double* buf = coords.data();
1855 for (
size_t i = 0; i < nofpoints; i++) {
1863 std::vector<double>
result;
1864 const size_t nofpoints = coords.size() / 2;
1865 result.reserve(coords.size());
1866 const int8_t* buf =
reinterpret_cast<const int8_t*
>(coords.data());
1867 for (
size_t i = 0; i < nofpoints; i++) {
1875 const std::vector<std::vector<double>>& coords) {
1876 std::vector<std::vector<int32_t>>
result;
1877 result.reserve(coords.size());
1878 for (
size_t i = 0; i < coords.size(); i++) {
1885 const std::vector<std::vector<int32_t>>& coords) {
1886 std::vector<std::vector<double>>
result;
1887 result.reserve(coords.size());
1888 for (
size_t i = 0; i < coords.size(); i++) {
1895 const std::vector<std::vector<std::vector<double>>>& coords) {
1896 std::vector<std::vector<std::vector<int32_t>>>
result;
1897 result.reserve(coords.size());
1898 for (
size_t i = 0; i < coords.size(); i++) {
1905 const std::vector<std::vector<std::vector<int32_t>>>& coords) {
1906 std::vector<std::vector<std::vector<double>>>
result;
1907 result.reserve(coords.size());
1908 for (
size_t i = 0; i < coords.size(); i++) {
1919 switch (m.format()) {
1921 return m.getGeoPointMetadata()->is_geoint;
1924 throw std::runtime_error(
"get_is_geoint: unexpected format " +
1935 switch (m.format()) {
1937 return m.getGeoPointMetadata()->input_srid;
1940 throw std::runtime_error(
"get_input_srid: unexpected format " +
1951 switch (m.format()) {
1953 return m.getGeoPointMetadata()->output_srid;
1956 throw std::runtime_error(
"get_output_srid: unexpected format " +
1964 template <
typename ItemType>
1985 values, 2 * index, ti->get_input_srid(), ti->get_output_srid(), ti->is_geoint());
1990 template <
typename CT,
typename VT>
1992 if constexpr (std::is_same<CT, VT>::value) {
2000 return FlatBufferManager::Status::Success;
2004 for (
size_t i = 0; i < sz; i++) {
2007 auto status = item.toCoords(ritem);
2008 if (status != FlatBufferManager::Status::Success) {
2011 result.push_back(ritem);
2013 return FlatBufferManager::Status::Success;
2018 template <
typename CT>
2020 return toCoordsWorker<CT, CT>(
result);
2023 template <
typename CT>
2025 return toCoordsWorker<CT, std::vector<CT>>(
result);
2028 template <
typename CT>
2030 std::vector<std::vector<std::vector<CT>>>&
result)
const {
2031 return toCoordsWorker<CT, std::vector<std::vector<CT>>>(
result);
2034 template <
typename CT,
typename VT>
2038 if (ti ==
nullptr) {
2042 throw std::runtime_error(
2043 "NestedArray fromCoords failed: expected single index but got " +
2046 if (ti->is_geoint()) {
2047 if constexpr (std::is_same<CT, double>::value) {
2049 return m.setItem(
index_[0], ccoords);
2051 return m.setItem(
index_[0], coords);
2054 if constexpr (std::is_same<CT, double>::value) {
2055 return m.setItem(
index_[0], coords);
2058 return m.setItem(
index_[0], dcoords);
2064 template <
typename CT>
2066 return fromCoordsWorker<CT, std::vector<CT>>(coords);
2069 template <
typename CT>
2071 return fromCoordsWorker<CT, std::vector<std::vector<CT>>>(coords);
2074 template <
typename CT>
2076 const std::vector<std::vector<std::vector<CT>>>& coords) {
2077 return fromCoordsWorker<CT, std::vector<std::vector<std::vector<CT>>>>(coords);
2085 return getPoint(static_cast<int64_t>(index));
2092 template <
typename CT>
2096 if (status != FlatBufferManager::Status::Success) {
2098 throw std::runtime_error(::
typeName(
this) +
2099 " toCoords failed: " + ::
toString(status));
2106 return toCoords<double>();
2114 return getPoint(static_cast<int64_t>(index));
2121 template <
typename CT>
2125 if (status != FlatBufferManager::Status::Success) {
2127 throw std::runtime_error(::
typeName(
this) +
2128 " toCoords failed: " + ::
toString(status));
2135 return toCoords<double>();
2146 template <
typename CT>
2148 std::vector<std::vector<CT>>
result;
2150 if (status != FlatBufferManager::Status::Success) {
2151 throw std::runtime_error(::
typeName(
this) +
2152 " toCoords failed: " + ::
toString(status));
2158 return toCoords<double>();
2169 template <
typename CT>
2171 std::vector<std::vector<CT>>
result;
2173 if (status != FlatBufferManager::Status::Success) {
2174 throw std::runtime_error(::
typeName(
this) +
2175 " toCoords failed: " + ::
toString(status));
2181 return toCoords<double>();
2192 template <
typename CT>
2193 std::vector<std::vector<std::vector<CT>>>
toCoords()
const {
2194 std::vector<std::vector<std::vector<CT>>>
result;
2196 if (status != FlatBufferManager::Status::Success) {
2197 throw std::runtime_error(::
typeName(
this) +
2198 " toCoords failed: " + ::
toString(status));
2203 std::vector<std::vector<std::vector<double>>>
toCoords()
const {
2204 return toCoords<double>();
2248 auto status = m.getItemOld(index, size, ptr, is_null);
2249 if (status != FlatBufferManager::Status::Success) {
2251 throw std::runtime_error(
"getItem failed: " + ::
toString(status));
2260 (output_srid < 0 ? this_output_srid : output_srid),
2267 return getItem(static_cast<int64_t>(index), 0);
2277 auto status = m.isNull(index, is_null);
2279 if (status != FlatBufferManager::Status::Success) {
2280 throw std::runtime_error(
"isNull failed: " + ::
toString(status));
2288 auto status = m.
setNull(index);
2290 if (status != FlatBufferManager::Status::Success) {
2291 throw std::runtime_error(
"setNull failed: " + ::
toString(status));
2298 const auto* metadata = m.getGeoPointMetadata();
2299 int8_t*
dest =
nullptr;
2300 int64_t sz = 2 * (metadata->is_geoint ?
sizeof(int32_t) :
sizeof(
double));
2302 if (status != FlatBufferManager::Status::Success) {
2304 throw std::runtime_error(
"setItem failed: " + ::
toString(status));
2307 if (dest ==
nullptr) {
2309 throw std::runtime_error(
"setItem failed: dest is not set?!");
2312 if (metadata->is_geoint) {
2314 int32_t* ptr =
reinterpret_cast<int32_t*
>(
dest);
2318 double* ptr =
reinterpret_cast<double*
>(
dest);
2324 #ifdef HAVE_FLATBUFFER_TOSTRING
2337 template <
typename T>
2346 Array<TextEncodingDict>> {
2353 const auto* ti = getTypeInfo();
2354 return (ti ? ti->db_id : 0);
2358 const auto* ti = getTypeInfo();
2359 return (ti ? ti->dict_id : 0);
2368 #ifndef UDF_COMPILED
2372 , num_rows_(other.num_rows_)
2373 , string_dict_proxy_(other.string_dict_proxy_) {}
2375 const int64_t num_rows,
2377 : ptr_(ptr), num_rows_(num_rows), string_dict_proxy_(string_dict_proxy) {}
2379 : ptr_(input_vec.data())
2380 , num_rows_(static_cast<int64_t>(input_vec.size()))
2381 , string_dict_proxy_(nullptr) {}
2384 : ptr_(ptr), num_rows_(num_rows) {}
2385 #endif // #ifndef UDF_COMPILED
2388 : ptr_(ptr), num_rows_(num_rows) {}
2389 #endif // #ifndef __CUDACC__
2392 if (index >= num_rows_) {
2394 throw std::runtime_error(
"column buffer index is out of range");
2410 num_rows_ = num_rows;
2414 return is_null(ptr_[index].value);
2422 #ifndef UDF_COMPILED
2424 return string_dict_proxy_->getDictKey().db_id;
2427 return string_dict_proxy_->getDictKey().dict_id;
2430 return isNull(index) ?
"" : string_dict_proxy_->getString(ptr_[index].value);
2433 return string_dict_proxy_->getOrAddTransient(str);
2435 #endif // #ifndef UDF_COMPILED
2436 #endif // #ifndef __CUDACC__
2440 if (size() == other.
size()) {
2443 throw std::runtime_error(
"cannot copy assign columns with different sizes");
2446 if (size() == other.
size()) {
2447 for (
unsigned int i = 0; i < size(); i++) {
2457 #ifdef HAVE_TOSTRING
2467 return is_null(ptr_[index].time);
2483 template <
typename T>
2490 : ptrs_(ptrs), num_cols_(num_cols), num_rows_(num_rows) {}
2495 if (index >= 0 && index < num_cols_)
2496 return {
reinterpret_cast<T*
>(ptrs_[index]), num_rows_};
2498 return {
nullptr, -1};
2501 #ifdef HAVE_TOSTRING
2505 for (int64_t index = 0; index < num_cols_; index++) {
2506 result +=
::toString(reinterpret_cast<void*>(ptrs_[index])) +
2507 (index < num_cols_ - 1 ?
", " :
"");
2517 template <
typename T>
2526 int8_t* ptr = ((index >= 0 && index < num_cols_) ? ptrs_[index] :
nullptr);
2527 int64_t num_rows = ((index >= 0 && index < num_cols_) ? num_rows_ : -1);
2532 #ifdef HAVE_TOSTRING
2536 for (int64_t index = 0; index < num_cols_; index++) {
2537 result +=
::toString(reinterpret_cast<void*>(ptrs_[index])) +
2538 (index < num_cols_ - 1 ?
", " :
"");
2554 #ifndef UDF_COMPILED
2557 const int64_t num_cols,
2558 const int64_t num_rows,
2561 , num_cols_(num_cols)
2562 , num_rows_(num_rows)
2563 , string_dict_proxies_(string_dict_proxies) {}
2565 DEVICE ColumnList(int8_t** ptrs,
const int64_t num_cols,
const int64_t num_rows)
2566 : ptrs_(ptrs), num_cols_(num_cols), num_rows_(num_rows) {}
2567 #endif // #ifndef UDF_COMPILED
2569 DEVICE ColumnList(int8_t** ptrs,
const int64_t num_cols,
const int64_t num_rows)
2570 : ptrs_(ptrs), num_cols_(num_cols), num_rows_(num_rows) {}
2571 #endif // #ifndef __CUDACC__
2580 if (index >= 0 && index < num_cols_) {
2584 #ifndef UDF_COMPILED
2586 string_dict_proxies_[index]
2595 #ifndef UDF_COMPILED
2605 #ifdef HAVE_TOSTRING
2609 for (int64_t index = 0; index < num_cols_; index++) {
2610 result +=
::toString(reinterpret_cast<void*>(ptrs_[index])) +
2611 (index < num_cols_ - 1 ?
", " :
"");
2621 #endif // #ifndef UDF_COMPILED
DEVICE RowStruct operator()(const unsigned int index) const
std::string toString() const
DEVICE const std::string getString(int64_t index) const
FlatBufferManager::Status toCoordsWorker(std::vector< VT > &result) const
EXTENSION_NOINLINE_HOST int32_t RowFunctionManager_getDictDbId(int8_t *mgr_ptr, const char *func_name, size_t arg_idx)
void set_output_row_size(int64_t num_rows)
DEVICE int64_t getSize() const
std::string toString() const
std::string getString(int32_t db_id, int32_t dict_id, int32_t string_id)
DEVICE Array(const flatbuffer::Array< T > &arr)
DEVICE ALWAYS_INLINE Timestamp truncateToSeconds() const
DEVICE int32_t getDictDbId() const
FlatBufferManager::Status fromCoords(const std::vector< std::vector< std::vector< CT >>> &coords)
DEVICE int32_t getCoordsSize() const
DEVICE ALWAYS_INLINE Timestamp truncateToDay() const
std::vector< double > decompress_coords(const int8_t *data, const int64_t size, const bool is_geoint)
const ItemType getItem(const int64_t index) const
const ItemType operator[](const int64_t index) const
void set_output_array_values_total_number(int32_t index, int64_t output_array_values_total_number)
DEVICE int64_t getSize() const
bool isNull(int64_t index) const
std::string DatumToString(Datum d, const SQLTypeInfo &ti)
DEVICE double decompress_x_coord(const int8_t *data, const int64_t index, const bool is_geoint)
EXTENSION_NOINLINE_HOST void set_output_array_values_total_number(int32_t index, int64_t output_array_values_total_number)
FlatBufferManager::Status fromCoords(const std::vector< std::vector< CT >> &coords)
int64_t index_[NESTED_ARRAY_NDIM]
DEVICE Column(std::vector< T > &input_vec)
DEVICE ALWAYS_INLINE bool operator!=(const int64_t &other) const
EXTENSION_NOINLINE_HOST void set_output_row_size(int64_t num_rows)
DEVICE RowType getItem(const int64_t index) const
#define EXTENSION_NOINLINE
DEVICE ALWAYS_INLINE const Timestamp operator+(const Timestamp &other) const
DEVICE double decompress_latitude_coord_geoint32(const int32_t compressed)
DEVICE uint64_t compress_longitude_coord_geoint32(const double coord)
DEVICE int32_t getCompression() const
DEVICE int32_t getInputSrid() const
DEVICE int32_t getInputSrid() const
void get_metadata(const std::string &key, T &value)
const SQLTypeInfoLite * getTypeInfo() const
FlatBufferManager::Status toCoords(std::vector< std::vector< CT >> &result) const
EXTENSION_NOINLINE_HOST int32_t RowFunctionManager_getDictId(int8_t *mgr_ptr, const char *func_name, size_t arg_idx)
EXTENSION_NOINLINE_HOST int32_t table_function_success_code()
DEVICE ALWAYS_INLINE bool operator==(const YearMonthTimeInterval &other) const
EXTENSION_NOINLINE_HOST int8_t * TableFunctionManager_get_singleton()
EXTENSION_NOINLINE_HOST void ColumnArray_setNull(int8_t *flatbuffer, int64_t index)
DEVICE int8_t * getRingSizes()
DEVICE double decompress_y_coord(const int8_t *data, const int64_t index, const bool is_geoint)
std::string getString() const
EXTENSION_NOINLINE_HOST void ColumnArray_getArray(int8_t *flatbuffer, const int64_t index, const int64_t expected_numel, int8_t *&ptr, int64_t &size, bool &is_null)
EXTENSION_NOINLINE_HOST int32_t TableFunctionManager_getNewDictDbId(int8_t *mgr_ptr)
DEVICE ALWAYS_INLINE bool operator<(const TextEncodingDict &other) const
int32_t getOrAddTransient(int32_t db_id, int32_t dict_id, std::string str)
Simplified core of GeoJSON Polygon coordinates definition.
std::vector< std::vector< std::vector< CT > > > toCoords() const
DEVICE ALWAYS_INLINE int64_t getMicroseconds() const
DEVICE Point2D getPoint(const int64_t index) const
DEVICE ALWAYS_INLINE char * data() const
DEVICE YearMonthTimeInterval(int64_t init)
TextEncodingDict operator=(const int32_t other)
DEVICE int64_t size() const
EXTENSION_NOINLINE_HOST int32_t RowFunctionManager_getOrAddTransient(int8_t *mgr_ptr, int32_t db_id, int32_t dict_id, std::string str)
DEVICE int32_t getSize() const
CONSTEXPR DEVICE void set_null< Timestamp >(Timestamp &t)
std::string toString() const
DEVICE int32_t getNumLineStrings() const
std::vector< std::vector< double > > toCoords() const
EXTENSION_NOINLINE_HOST void ColumnArray_concatItem(int8_t *flatbuffer, int64_t index, const int8_t *ptr, int64_t size, bool is_null, int64_t sizeof_T)
std::vector< CT > toCoords() const
std::vector< std::vector< CT > > toCoords() const
EXTENSION_NOINLINE_HOST void TableFunctionManager_set_output_item_values_total_number(int8_t *mgr_ptr, int32_t index, int64_t output_item_values_total_number)
std::string toString() const
DEVICE void concatItem(int64_t index, const RowType &item)
DEVICE int64_t DateTruncate(DatetruncField field, const int64_t timeval)
int32_t get_output_srid(const int8_t *flatbuffer)
DEVICE int64_t size() const
DEVICE Timestamp(std::string_view const str)
DEVICE int64_t numCols() const
DEVICE T operator()(const int64_t index) const
DEVICE ALWAYS_INLINE int64_t getYear() const
EXTENSION_NOINLINE_HOST void ColumnArray_setItem(int8_t *flatbuffer, int64_t index, const int8_t *ptr, int64_t size, bool is_null, int64_t sizeof_T)
int32_t getDictId(const char *func_name, size_t arg_idx)
DEVICE ColumnList(int8_t **ptrs, const int64_t num_cols, const int64_t num_rows)
DEVICE int32_t getOutputSrid() const
DEVICE void setItem(int64_t index, const RowStruct &item)
DEVICE T * getPtr() const
void getRawBuffer(int8_t *&values, int64_t &nof_values, size_t &value_size, bool &is_null, bool require_1d_item=true) const
DEVICE Column< T > & operator=(const Column< T > &other)
DEVICE Column< T > operator[](const int index) const
const SQLTypeInfoLite * getTypeInfo() const
DEVICE ALWAYS_INLINE bool operator!=(const DayTimeInterval &other) const
DEVICE int64_t size() const
EXTENSION_NOINLINE_HOST void ColumnArray_concatArray(int8_t *flatbuffer, int64_t index, const int8_t *ptr, int64_t size, bool is_null)
DEVICE int32_t getDictDbId() const
int32_t get_input_srid(const int8_t *flatbuffer)
RUNTIME_EXPORT DEVICE int64_t DateAddHighPrecisionNullable(const DateaddField field, const int64_t number, const int64_t timeval, const int32_t dim, const int64_t null_val)
DEVICE int32_t getCompression() const
std::vector< std::vector< double > > toCoords() const
DEVICE void setNull(int64_t index)
DEVICE ALWAYS_INLINE Timestamp truncateToHours() const
DEVICE ALWAYS_INLINE int64_t getDay() const
DEVICE ALWAYS_INLINE Timestamp operator+(const Timestamp &t) const
EXTENSION_NOINLINE_HOST void TableFunctionManager_get_metadata(int8_t *mgr_ptr, const char *key, const uint8_t *&raw_bytes, size_t &num_bytes, TableFunctionMetadataType &value_type)
DEVICE void concatItem(int64_t index, const RowStruct &item)
DEVICE int8_t * getPolygonSizes()
EXTENSION_NOINLINE_HOST int8_t * RowFunctionManager_makeBuffer(int8_t *mgr_ptr, int64_t count, int64_t size)
DEVICE ALWAYS_INLINE bool operator==(const Timestamp &other) const
DEVICE ALWAYS_INLINE bool operator!=(const YearMonthTimeInterval &other) const
std::vector< CT > toCoords() const
DEVICE int64_t size() const
DEVICE Point2D get_point(const int8_t *data, const int64_t index, const int32_t input_srid, const int32_t output_srid, const bool is_geoint)
std::string toString() const
DEVICE int8_t * getLineStringSizes()
DEVICE void setNull(int64_t index)
DEVICE ALWAYS_INLINE int64_t size() const
Simplified core of GeoJSON MultiPolygon coordinates definition.
DEVICE ALWAYS_INLINE Timestamp truncateToYear() const
EXTENSION_NOINLINE_HOST int32_t TableFunctionManager_error_message(int8_t *mgr_ptr, const char *message)
int8_t * linestring_sizes
DEVICE ALWAYS_INLINE bool operator==(const TextEncodingDict &other) const
EXTENSION_NOINLINE_HOST int8_t * TableFunctionManager_getStringDictionaryProxy(int8_t *mgr_ptr, int32_t db_id, int32_t dict_id)
size_t size(const int64_t index) const
DEVICE TextEncodingNone & operator+=(const std::string &s)
std::vector< std::vector< std::vector< double > > > toCoords() const
DEVICE Geo::Point2D getItem(const int64_t index, const int32_t output_srid=0) const
HOST Array(M &mgr, const int64_t size, const bool is_null=false)
DEVICE int32_t getDictId() const
int32_t error_message(const char *message)
DEVICE int32_t compress_x_coord(const double *x, const int64_t index)
DEVICE Array< T > & operator+=(const ::Array< T > &s)
EXTENSION_NOINLINE int8_t * allocate_varlen_buffer(int64_t element_count, int64_t element_size)
DEVICE T & operator[](const unsigned int index) const
TableFunctionMetadataType get_metadata_type()
DEVICE uint64_t compress_latitude_coord_geoint32(const double coord)
CONSTEXPR DEVICE bool is_null(const T &value)
std::string TableFunctionManager_getString(int8_t *mgr_ptr, int32_t db_id, int32_t dict_id, int32_t string_id)
EXTENSION_NOINLINE_HOST int8_t * TableFunctionManager_makeBuffer(int8_t *mgr_ptr, int64_t count, int64_t size)
StringDictionaryProxy ** string_dict_proxies_
DEVICE Array(const int64_t size, const bool is_null=false)
DEVICE TextEncodingDict inline_null_value()
DEVICE ALWAYS_INLINE bool operator<(const int32_t &other) const
DEVICE Column< Array< T > > operator[](const int index) const
void init(LogOptions const &log_opts)
DEVICE int32_t getDictId() const
DEVICE ALWAYS_INLINE bool operator!=(const int32_t &other) const
std::string toString() const
DEVICE int32_t compress_y_coord(const double *x, const int64_t index)
std::vector< double > toCoords() const
DEVICE ALWAYS_INLINE Timestamp operator+(const Timestamp &t) const
DEVICE ALWAYS_INLINE bool isNull() const
DEVICE T operator()(const unsigned int index) const
FlatBufferManager::Status toCoords(std::vector< std::vector< std::vector< CT >>> &result) const
int64_t getNofValues() const
std::string toString() const
DEVICE int32_t getCoordsSize() const
StringDictionaryProxy * string_dict_proxy_
std::string getString() const
CONSTEXPR DEVICE void set_null(T &value)
std::vector< double > toCoords() const
DEVICE ALWAYS_INLINE int64_t numStepsBetween(const Timestamp &begin, const Timestamp &end) const
DEVICE ALWAYS_INLINE T * data() const
DEVICE int64_t getSize() const
#define EXTENSION_NOINLINE_HOST
DEVICE int32_t getInputSrid() const
DEVICE ALWAYS_INLINE bool operator==(const char *rhs) const
DEVICE int32_t getCompression() const
DEVICE ALWAYS_INLINE int64_t operator/(const Timestamp &other) const
DEVICE T operator()(const unsigned int index) const
std::string toString() const
DEVICE int32_t getSize() const
std::vector< std::vector< CT > > toCoords() const
DEVICE ALWAYS_INLINE DayTimeInterval operator*(const int64_t multiplier) const
DEVICE TextEncodingDict & operator[](const unsigned int index) const
DEVICE int8_t * getRingSizes()
bool get_is_geoint(const int8_t *flatbuffer)
DEVICE ALWAYS_INLINE bool operator!=(const TextEncodingNone &rhs) const
DEVICE ALWAYS_INLINE int64_t getMinutes() const
DEVICE ALWAYS_INLINE int64_t getSeconds() const
bool g_enable_smem_group_by true
FlatBufferManager::Status toCoords(std::vector< CT > &result) const
std::string toString(const Executor::ExtModuleKinds &kind)
DEVICE ALWAYS_INLINE bool operator!=(const TextEncodingDict &other) const
void disable_output_allocations()
std::vector< int32_t > compress_coords(const int8_t *data, const int64_t size, const bool is_geoint)
DEVICE const T & operator[](const unsigned int index) const
DEVICE int32_t getNumRings() const
DEVICE ALWAYS_INLINE const Timestamp operator-(const Timestamp &other) const
DEVICE bool operator==(const Array &other) const
DEVICE int32_t getOutputSrid() const
std::string toString() const
DEVICE int32_t getNumPolygons() const
EXTENSION_NOINLINE_HOST int32_t table_function_error(const char *message)
DEVICE TextEncodingDict * getPtr() const
DEVICE int64_t numCols() const
DEVICE int32_t getCompression() const
StringDictionaryProxy * getStringDictionaryProxy(int32_t db_id, int32_t dict_id)
EXTENSION_NOINLINE_HOST bool ColumnArray_isNull(int8_t *flatbuffer, int64_t index)
DEVICE int32_t getCompression() const
DEVICE ALWAYS_INLINE Timestamp truncateToMilliseconds() const
TextEncodingDict(const int32_t other)
int8_t * makeBuffer(int64_t element_count, int64_t element_size)
DEVICE ALWAYS_INLINE bool operator!=(const Timestamp &other) const
DEVICE bool isNull(int64_t index) const
DEVICE int32_t getOutputSrid() const
EXTENSION_NOINLINE_HOST void ColumnArray_getItem(int8_t *flatbuffer, const int64_t index, const int64_t expected_numel, int8_t *&ptr, int64_t &size, bool &is_null, int64_t sizeof_T)
DEVICE constexpr T null_value() const
int8_t * makeBuffer(int64_t element_count, int64_t element_size)
void extend(const NestedArray< ItemType > &other, bool assign=false)
DEVICE RowType getItem(const int64_t index, const int64_t extra_numel) const
FlatBufferManager::Status fromCoordsWorker(const VT &coords)
DEVICE int32_t getCoordsSize() const
DEVICE TextEncodingNone & operator=(const ::TextEncodingNone &other)
DEVICE Timestamp(int64_t timeval)
DEVICE ALWAYS_INLINE char & operator[](const unsigned int index)
EXTENSION_NOINLINE_HOST void TableFunctionManager_set_metadata(int8_t *mgr_ptr, const char *key, const uint8_t *raw_bytes, const size_t num_bytes, const TableFunctionMetadataType value_type)
DEVICE bool isNull(int64_t index) const
int32_t getOrAddTransient(int32_t db_id, int32_t dict_id, std::string str)
DEVICE ALWAYS_INLINE Timestamp truncateToMicroseconds() const
DEVICE void setNull(int64_t index)
FlatBufferManager::Status fromCoords(const std::vector< CT > &coords)
DEVICE double decompress_longitude_coord_geoint32(const int32_t compressed)
DEVICE Column(const Column &other)
DEVICE void extend(const int8_t *data, const int32_t size, bool assign=false)
DEVICE int32_t getInputSrid() const
DEVICE Column< TextEncodingDict > operator[](const int index) const
void points_to_vector(const int8_t *points_buf, const int64_t nof_points, const bool is_geoint, std::vector< CT > &result)
DEVICE ALWAYS_INLINE int64_t getMonth() const
DEVICE Column(TextEncodingDict *ptr, const int64_t num_rows, StringDictionaryProxy *string_dict_proxy)
DEVICE int32_t getOutputSrid() const
NestedArray< ItemType > & operator+=(const NestedArray< ItemType > &other)
void set_output_item_values_total_number(int32_t index, int64_t output_item_values_total_number)
DEVICE int64_t size() const
DEVICE bool isNull(int64_t index) const
EXTENSION_NOINLINE_HOST void set_output_item_values_total_number(int32_t index, int64_t output_item_values_total_number)
RUNTIME_EXPORT NEVER_INLINE HOST std::string RowFunctionManager_getString(int8_t *mgr_ptr, int32_t db_id, int32_t dict_id, int32_t string_id)
std::string typeName(const T *v)
NestedArray< ItemType > & operator=(const NestedArray< ItemType > &other)
DEVICE Column< TextEncodingDict > & operator=(const Column< TextEncodingDict > &other)
DEVICE void setSize(int64_t num_rows)
DEVICE int32_t getCompression() const
DEVICE ALWAYS_INLINE bool operator==(const DayTimeInterval &other) const
DEVICE ALWAYS_INLINE Timestamp operator+(const DayTimeInterval &interval) const
DEVICE ALWAYS_INLINE int64_t getHours() const
DEVICE ALWAYS_INLINE bool isNull() const
DEVICE ALWAYS_INLINE size_t size() const
EXTENSION_NOINLINE_HOST void TableFunctionManager_set_output_row_size(int8_t *mgr_ptr, int64_t num_rows)
void getValuesBuffer(T *&values, int64_t &nof_values, bool &is_null, bool require_1d_item=true) const
DEVICE int8_t * getCoords() const
DEVICE TextEncodingNone & operator+=(const ::TextEncodingNone &other)
TextEncodingNone()=default
DEVICE int32_t getNumRings() const
void set_metadata(const std::string &key, const T &value)
DEVICE Array(T *ptr, const int64_t size, const bool is_null=false)
DEVICE ALWAYS_INLINE Timestamp truncateToMonth() const
DEVICE ALWAYS_INLINE bool operator<(const Timestamp &other) const
std::string getString(int32_t db_id, int32_t dict_id, int32_t string_id)
DEVICE ALWAYS_INLINE int64_t numStepsBetween(const Timestamp &begin, const Timestamp &end) const
DEVICE ALWAYS_INLINE TextEncodingNone(M &mgr, const std::string &str)
DEVICE int64_t numCols() const
DEVICE RowType operator[](const unsigned int index) const
DEVICE Geo::Point2D operator[](const unsigned int index) const
DEVICE void setItem(int64_t index, const Geo::Point2D &other)
ItemType & getValue(const int64_t index) const
DEVICE Point2D operator[](const unsigned int index) const
DEVICE ALWAYS_INLINE int64_t getMilliseconds() const
std::string toString() const
DEVICE T & operator[](const unsigned int index)
DEVICE void setNull(int64_t index)
DEVICE bool isNull(int64_t index) const
DEVICE int64_t size() const
DEVICE int32_t getInputSrid() const
EXTENSION_NOINLINE_HOST int32_t TableFunctionManager_getNewDictId(int8_t *mgr_ptr)
std::string toString() const
DEVICE int64_t size() const
DEVICE Column(const Column &other)
DEVICE ALWAYS_INLINE const Timestamp operator*(const int64_t multiplier) const
DEVICE ALWAYS_INLINE YearMonthTimeInterval operator*(const int64_t multiplier) const
char & operator[](const int64_t index)
DEVICE Column(T *ptr, const int64_t num_rows)
DEVICE ALWAYS_INLINE bool operator==(const TextEncodingNone &rhs) const
DEVICE const TextEncodingDict getOrAddTransient(const std::string &str)
DEVICE ColumnList(int8_t **ptrs, const int64_t num_cols, const int64_t num_rows, StringDictionaryProxy **string_dict_proxies)
DEVICE ALWAYS_INLINE int64_t getNanoseconds() const
TextEncodingNone(char const *const c_str)
#define NESTED_ARRAY_NDIM
DEVICE DayTimeInterval(int64_t init)
DEVICE ALWAYS_INLINE Timestamp truncateToMinutes() const
DEVICE bool isNull(const unsigned int index) const
DEVICE int32_t getInputSrid() const
void enable_output_allocations()
DEVICE int32_t getOutputSrid() const
DEVICE ALWAYS_INLINE bool operator==(const int32_t &other) const
T & operator[](const int64_t index)
static TableFunctionManager * get_singleton()
std::string toString() const
DEVICE void setItem(int64_t index, const RowType &item)
EXTENSION_NOINLINE_HOST void TableFunctionManager_set_output_array_values_total_number(int8_t *mgr_ptr, int32_t index, int64_t output_array_values_total_number)
DEVICE bool isNull() const
DEVICE ALWAYS_INLINE bool operator<(const int64_t &other) const
EXTENSION_NOINLINE_HOST void ColumnArray_setArray(int8_t *flatbuffer, int64_t index, const int8_t *ptr, int64_t size, bool is_null)
std::string toString() const
DEVICE ALWAYS_INLINE bool operator!=(const char *rhs) const
DEVICE void setSize(int64_t num_rows)
int32_t getDictDbId(const char *func_name, size_t arg_idx)
HOST DEVICE Status setNull(int64_t index)
DEVICE int32_t getOutputSrid() const
DEVICE ALWAYS_INLINE bool operator==(const int64_t &other) const
DEVICE Point2D operator[](const unsigned int index) const
EXTENSION_NOINLINE_HOST int32_t TableFunctionManager_getOrAddTransient(int8_t *mgr_ptr, int32_t db_id, int32_t dict_id, std::string str)
DEVICE TextEncodingNone & operator=(const std::string &s)
DEVICE Column(std::vector< TextEncodingDict > &input_vec)
DEVICE Array< T > & operator=(const ::Array< T > &s)