27 using namespace DateTimeUtils;
75 const int64_t scale) {
85 : from_expr_(expr), field_(field) {}
87 : from_expr_(expr), field_(to_extract_field(field)) {}
89 static std::shared_ptr<Analyzer::Expr>
generate(
const std::shared_ptr<Analyzer::Expr>,
91 static std::shared_ptr<Analyzer::Expr>
generate(
const std::shared_ptr<Analyzer::Expr>,
94 const std::shared_ptr<Analyzer::Expr>
generate()
const {
108 : from_expr_(expr), field_(field) {}
110 : from_expr_(expr), field_(to_datetrunc_field(field)) {}
112 static std::shared_ptr<Analyzer::Expr>
generate(
const std::shared_ptr<Analyzer::Expr>,
114 static std::shared_ptr<Analyzer::Expr>
generate(
const std::shared_ptr<Analyzer::Expr>,
117 const std::shared_ptr<Analyzer::Expr>
generate()
const {
118 return generate(from_expr_, field_);
Defines data structures for the semantic analysis phase of query processing.
DateTruncExpr(const std::shared_ptr< Analyzer::Expr > expr, const DatetruncField &field)
constexpr int64_t get_extract_timestamp_precision_scale(const ExtractField field)
DEVICE int64_t DateTruncate(DatetruncField field, const int64_t timeval)
const std::pair< SQLOps, int64_t > get_extract_high_precision_adjusted_scale(const ExtractField &field, const int32_t dimen)
static int64_t getExtractFromTimeConstantValue(const int64_t &timeval, const ExtractField &field, const SQLTypeInfo &ti)
const rapidjson::Value & field(const rapidjson::Value &obj, const char field[]) noexcept
constexpr bool is_subsecond_datetrunc_field(const DatetruncField field)
static std::shared_ptr< Analyzer::Constant > getNumericConstant(const int64_t scale)
std::shared_ptr< Analyzer::Expr > from_expr_
HOST DEVICE int get_dimension() const
constexpr int64_t get_timestamp_precision_scale(const int32_t dimen)
bool is_high_precision_timestamp() const
static int64_t getDateTruncConstantValue(const int64_t &timeval, const DatetruncField &field, const SQLTypeInfo &ti)
DateTruncExpr(const std::shared_ptr< Analyzer::Expr > expr, const std::string &field)
constexpr bool is_subsecond_extract_field(const ExtractField &field)
const std::shared_ptr< Analyzer::Expr > generate() const
const int64_t get_datetrunc_high_precision_scale(const DatetruncField &field, const int32_t dimen)