@@ -59,23 +59,38 @@ class TDqInputImpl : public IInputInterface {
59
59
60
60
TInputChannelFormat GetFormat () {
61
61
if (Width) {
62
- if (InputType->IsStruct ()) {
63
- auto structType = static_cast <NKikimr::NMiniKQL::TStructType*>(InputType);
64
- for (ui32 i = 0 ; i < structType->GetMembersCount (); i++) {
65
- if (structType->GetMemberType (i)->IsBlock ()) {
66
- return BLOCK_WIDE;
62
+ switch (InputType->GetKind ()) {
63
+ case NKikimr::NMiniKQL::TTypeBase::EKind::Struct: {
64
+ auto structType = static_cast <NKikimr::NMiniKQL::TStructType*>(InputType);
65
+ for (ui32 i = 0 ; i < structType->GetMembersCount (); i++) {
66
+ if (structType->GetMemberType (i)->IsBlock ()) {
67
+ return BLOCK_WIDE;
68
+ }
67
69
}
70
+ break ;
68
71
}
69
- } else if (InputType->IsTuple ()) {
70
- auto tupleType= static_cast <NKikimr::NMiniKQL::TTupleType*>(InputType);
71
- for (ui32 i = 0 ; i < tupleType->GetElementsCount (); i++) {
72
- if (tupleType->GetElementType (i)->IsBlock ()) {
73
- return BLOCK_WIDE;
72
+ case NKikimr::NMiniKQL::TTypeBase::EKind::Tuple: {
73
+ auto tupleType = static_cast <NKikimr::NMiniKQL::TTupleType*>(InputType);
74
+ for (ui32 i = 0 ; i < tupleType->GetElementsCount (); i++) {
75
+ if (tupleType->GetElementType (i)->IsBlock ()) {
76
+ return BLOCK_WIDE;
77
+ }
74
78
}
79
+ break ;
75
80
}
76
- } else {
77
- return SIMPLE_WIDE;
81
+ case NKikimr::NMiniKQL::TTypeBase::EKind::Multi: {
82
+ auto multiType = static_cast <NKikimr::NMiniKQL::TMultiType*>(InputType);
83
+ for (ui32 i = 0 ; i < multiType->GetElementsCount (); i++) {
84
+ if (multiType->GetElementType (i)->IsBlock ()) {
85
+ return BLOCK_WIDE;
86
+ }
87
+ }
88
+ break ;
89
+ }
90
+ default :
91
+ break ;
78
92
}
93
+ return SIMPLE_WIDE;
79
94
}
80
95
81
96
if (InputType->IsStruct ()) {
0 commit comments