summaryrefslogtreecommitdiffstats
path: root/yql/essentials/udfs/common/python/bindings/py_test_engine.h
diff options
context:
space:
mode:
authorvvvv <[email protected]>2025-10-06 13:26:25 +0300
committervvvv <[email protected]>2025-10-06 14:06:25 +0300
commiteca8ce9cb1613d5c983185c4e43c20651a9638aa (patch)
tree61ee5ae779948e61af9a7691d19eaa2c09869121 /yql/essentials/udfs/common/python/bindings/py_test_engine.h
parent4adf7eecae16a9b228b28cc5f64c27ef69ad5ec2 (diff)
YQL-20086 udfs
init commit_hash:f9684778bf1ea956965f2360b80b91edb7d4ffbe
Diffstat (limited to 'yql/essentials/udfs/common/python/bindings/py_test_engine.h')
-rw-r--r--yql/essentials/udfs/common/python/bindings/py_test_engine.h26
1 files changed, 12 insertions, 14 deletions
diff --git a/yql/essentials/udfs/common/python/bindings/py_test_engine.h b/yql/essentials/udfs/common/python/bindings/py_test_engine.h
index 6809fc61cff..c2fce35bca3 100644
--- a/yql/essentials/udfs/common/python/bindings/py_test_engine.h
+++ b/yql/essentials/udfs/common/python/bindings/py_test_engine.h
@@ -13,7 +13,6 @@
#define PYTHON_TEST_TAG "Python2Test"
-
using namespace NKikimr;
using namespace NMiniKQL;
@@ -49,15 +48,14 @@ public:
, FunctionInfoBuilder_(NYql::UnknownLangVersion, Env_, TypeInfoHelper_, "", nullptr, {})
{
HolderFactory_ = MakeHolder<THolderFactory>(
- Alloc_.Ref(),
- MemInfo_,
- nullptr);
+ Alloc_.Ref(),
+ MemInfo_,
+ nullptr);
ValueBuilder_ = MakeHolder<TDefaultValueBuilder>(*HolderFactory_, NUdf::EValidatePolicy::Exception);
BindTerminator_ = MakeHolder<TBindTerminator>(ValueBuilder_.Get());
Singleton<TPyInitializer>();
CastCtx_ = MakeIntrusive<TPyCastContext>(&GetValueBuilder(),
- MakeIntrusive<TPyContext>(TypeInfoHelper_.Get(), NUdf::TStringRef::Of(PYTHON_TEST_TAG), NUdf::TSourcePosition())
- );
+ MakeIntrusive<TPyContext>(TypeInfoHelper_.Get(), NUdf::TStringRef::Of(PYTHON_TEST_TAG), NUdf::TSourcePosition()));
}
~TPythonTestEngine() {
@@ -90,8 +88,8 @@ public:
template <typename TChecker>
void ToMiniKQLWithArg(
- NUdf::TType* udfType, PyObject* argValue,
- const TStringBuf& script, TChecker&& checker)
+ NUdf::TType* udfType, PyObject* argValue,
+ const TStringBuf& script, TChecker&& checker)
{
TPyObjectPtr args = Py_BuildValue("(O)", argValue);
@@ -108,8 +106,8 @@ public:
template <typename TExpectedType, typename TChecker>
void ToMiniKQLWithArg(
- PyObject* argValue,
- const TStringBuf& script, TChecker&& checker)
+ PyObject* argValue,
+ const TStringBuf& script, TChecker&& checker)
{
auto type = GetTypeBuilder().SimpleType<TExpectedType>();
ToMiniKQLWithArg<TChecker>(type, argValue, script, std::move(checker));
@@ -143,9 +141,9 @@ public:
template <typename TMiniKQLValueBuilder>
TPyObjectPtr ToPython(
- NUdf::TType* udfType,
- TMiniKQLValueBuilder&& builder,
- const TStringBuf& script)
+ NUdf::TType* udfType,
+ TMiniKQLValueBuilder&& builder,
+ const TStringBuf& script)
{
try {
TType* type = static_cast<TType*>(udfType);
@@ -239,7 +237,7 @@ private:
}
TPyObjectPtr RunPythonFunction(
- const TStringBuf& script, PyObject* args = nullptr)
+ const TStringBuf& script, PyObject* args = nullptr)
{
TPyObjectPtr function(CompilePythonFunction(script));
return PyObject_CallObject(function.Get(), args);