MCPcopy Create free account
hub / github.com/ByConity/ByConity / getArrayJoinDataType

Function getArrayJoinDataType

src/Interpreters/ArrayJoinAction.cpp:26–39  ·  view source on GitHub ↗

ArrayJoin support Array, Nullable(Array) and Map type

Source from the content-addressed store, hash-verified

24
25//ArrayJoin support Array, Nullable(Array) and Map type
26std::shared_ptr<const DataTypeArray> getArrayJoinDataType(DataTypePtr type)
27{
28 using DataTypeArrayPtr = std::shared_ptr<const DataTypeArray>;
29 // we don't assume what inside Nullable is always Array
30 if (const auto * nullable_type = typeid_cast<const DataTypeNullable *>(type.get()))
31 type = nullable_type->getNestedType();
32
33 if (auto array_type_ptr = typeid_cast<DataTypeArrayPtr>(type))
34 return array_type_ptr;
35 else if (const auto * map_type = typeid_cast<const DataTypeMap *>(type.get()))
36 return typeid_cast<DataTypeArrayPtr>(map_type->getNestedType());
37
38 return nullptr;
39}
40
41ColumnPtr getArrayJoinColumn(ColumnPtr column)
42{

Callers 8

ActionsDAG.cppFile · 0.85
executeActionFunction · 0.85
ArrayJoinStepMethod · 0.85
convertArrayJoinColumnFunction · 0.85
prepareMethod · 0.85
executeMethod · 0.85
analyzeArrayJoinMethod · 0.85
getReturnTypeImplMethod · 0.85

Calls 2

getNestedTypeMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected