Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb::RangeDateTimeBindData Struct Reference
Inheritance diagram for duckdb::RangeDateTimeBindData:
Collaboration diagram for duckdb::RangeDateTimeBindData:

Public Member Functions

 RangeDateTimeBindData (const vector< Value > &inputs)
Public Member Functions inherited from duckdb::TableFunctionData
DUCKDB_API unique_ptr< FunctionData > Copy () const override
DUCKDB_API bool Equals (const FunctionData &other) const override
Public Member Functions inherited from duckdb::FunctionData
virtual DUCKDB_API bool SupportStatementCache () const
template<class TARGET>
TARGET & Cast ()
template<class TARGET>
const TARGET & Cast () const
template<class TARGET>
TARGET & CastNoConst () const

Public Attributes

idx_t cardinality
Public Attributes inherited from duckdb::TableFunctionData
vector< idx_t > column_ids

Additional Inherited Members

Static Public Member Functions inherited from duckdb::FunctionData
static DUCKDB_API bool Equals (const FunctionData *left, const FunctionData *right)

Constructor & Destructor Documentation

◆ RangeDateTimeBindData()

duckdb::RangeDateTimeBindData::RangeDateTimeBindData ( const vector< Value > & inputs)
inlineexplicit
242838 : cardinality(0) {
242839 timestamp_t bounds[2];
242840 interval_t step;
242841 for (idx_t i = 0; i < inputs.size(); i++) {
242842 if (inputs[i].IsNull()) {
242843 return;
242844 }
242845 if (i >= 2) {
242846 step = inputs[i].GetValue<interval_t>();
242847 } else {
242848 bounds[i] = inputs[i].GetValue<timestamp_t>();
242849 }
242850 }
242851 // Estimate cardinality using micros.
242852 int64_t increment = 0;
242853 if (!Interval::TryGetMicro(step, increment) || !increment) {
242854 return;
242855 }
242856 int64_t delta = 0;
242857 if (!TrySubtractOperator::Operation(bounds[1].value, bounds[0].value, delta)) {
242858 return;
242859 }
242860
242861 cardinality = idx_t(delta / increment);
242862 }
static bool TryGetMicro(const interval_t &val, int64_t &micros)
Get Interval in microseconds.
Definition duckdb.cpp:123413
::int64_t int64_t
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237

The documentation for this struct was generated from the following file: