Skip to content

ASOF join Date type is not supported. #7896

@FedorKononov

Description

@FedorKononov

should be one of the data types: UInt32, UInt64, Float32, Float64, Date, and DateTime

Code: 169. DB::Exception: Received from 192.168.99.100:9091. DB::Exception: ASOF join not supported for typeUInt16

When I changed my field for asof_condition to Datetime my query worked.

In the code, I found no mentioning of the Date type. Lokes like the documentation goes a bit ahead or the type was forgotten.

        asof_type = AsofRowRefs::getTypeSize(asof_column, asof_size);
        if (!asof_type)
        {
            std::string msg = "ASOF join not supported for type";
            msg += asof_column->getFamilyName();
            throw Exception(msg, ErrorCodes::BAD_TYPE_OF_FIELD);
        }

RowRefs.cpp

void callWithType(AsofRowRefs::Type which, F && f)
{
    switch (which)
    {
        case AsofRowRefs::Type::key32:  return f(UInt32());
        case AsofRowRefs::Type::key64:  return f(UInt64());
        case AsofRowRefs::Type::keyf32: return f(Float32());
        case AsofRowRefs::Type::keyf64: return f(Float64());
    }

    __builtin_unreachable();
}

}


AsofRowRefs::AsofRowRefs(Type type)
{
    auto call = [&](const auto & t)
    {
      using T = std::decay_t<decltype(t)>;
      using LookupType = typename Entry<T>::LookupType;
      lookups = std::make_unique<LookupType>();
    };

    callWithType(type, call);
}

Sorry for the poorly written issue report.

Metadata

Metadata

Assignees

Labels

bugConfirmed user-visible misbehaviour in official releasecomp-joinsJOINs end-to-end (planning hooks + runtime join operators/algorithms). Single bucket to avoid pla...

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions