aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/providers/common/comp_nodes/yql_position.cpp
blob: 5ab02498ff765af3d26dbbb55e41943f09b38c9f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "yql_position.h"
#include <yql/essentials/minikql/mkql_node_cast.h>

namespace NKikimr {
namespace NMiniKQL {

NYql::TPosition ExtractPosition(TCallable& callable) {
    const TStringBuf file = AS_VALUE(TDataLiteral, callable.GetInput(0))->AsValue().AsStringRef();
    const ui32 row = AS_VALUE(TDataLiteral, callable.GetInput(1))->AsValue().Get<ui32>();
    const ui32 column = AS_VALUE(TDataLiteral, callable.GetInput(2))->AsValue().Get<ui32>();
    return NYql::TPosition(column, row, TString(file));
}

}
}