@@ -1399,7 +1399,7 @@ class TYqlCallableType final : public TCallNode {
13991399 return false ;
14001400 }
14011401
1402- if (!dynamic_cast <TTupleNode*>( Args[0 ]. Get () )) {
1402+ if (!Args[0 ]-> GetTupleNode ( )) {
14031403 ui32 numOptArgs;
14041404 if (!Parseui32 (Args[0 ], numOptArgs)) {
14051405 ctx.Error (Args[0 ]->GetPos ()) << " Expected either tuple or number of optional arguments" ;
@@ -1409,12 +1409,12 @@ class TYqlCallableType final : public TCallNode {
14091409 Args[0 ] = Q (Y (BuildQuotedAtom (Args[0 ]->GetPos (), ToString (numOptArgs))));
14101410 }
14111411
1412- if (!dynamic_cast <TTupleNode*>( Args[1 ]. Get () )) {
1412+ if (!Args[1 ]-> GetTupleNode ( )) {
14131413 Args[1 ] = Q (Y (Args[1 ]));
14141414 }
14151415
14161416 for (ui32 index = 2 ; index < Args.size (); ++index) {
1417- if (!dynamic_cast <TTupleNode*>( Args[index]. Get () )) {
1417+ if (!Args[index]-> GetTupleNode ( )) {
14181418 Args[index] = Q (Y (Args[index]));
14191419 }
14201420 }
@@ -1838,7 +1838,7 @@ class TTableRow final : public INode {
18381838
18391839 bool DoInit (TContext& ctx, ISource* src) override {
18401840 if (!src || src->IsFake ()) {
1841- ctx.Error (Pos) << " TableRow requires data source" ;
1841+ ctx.Error (Pos) << TStringBuilder () << (Join ? " Join " : " " ) << " TableRow requires data source" ;
18421842 return false ;
18431843 }
18441844
@@ -2300,7 +2300,7 @@ TNodePtr BuildSqlCall(TContext& ctx, TPosition pos, const TString& module, const
23002300 TVector<TNodePtr> sqlCallArgs;
23012301 sqlCallArgs.push_back (BuildQuotedAtom (pos, fullName));
23022302 if (namedArgs) {
2303- auto tupleNodePtr = dynamic_cast < const TTupleNode*>(positionalArgs. Get () );
2303+ auto tupleNodePtr = positionalArgs-> GetTupleNode ( );
23042304 YQL_ENSURE (tupleNodePtr);
23052305 TNodePtr positionalArgsNode = new TCallNodeImpl (pos, " PositionalArgs" , tupleNodePtr->Elements ());
23062306 sqlCallArgs.push_back (BuildTuple (pos, { positionalArgsNode, namedArgs }));
@@ -2484,7 +2484,7 @@ class TScriptUdf final: public INode {
24842484 return false ;
24852485 }
24862486 auto scriptStrPtr = Args.back ()->GetLiteral (" String" );
2487- if (scriptStrPtr && scriptStrPtr->size () > SQL_MAX_INLINE_SCRIPT_LEN) {
2487+ if (!ctx. CompactNamedExprs && scriptStrPtr && scriptStrPtr->size () > SQL_MAX_INLINE_SCRIPT_LEN) {
24882488 scriptNode = ctx.UniversalAlias (" scriptudf" , std::move (scriptNode));
24892489 }
24902490
@@ -3444,9 +3444,9 @@ TNodePtr BuildBuiltinFunc(TContext& ctx, TPosition pos, TString name, const TVec
34443444 };
34453445 };
34463446
3447- auto structNode = dynamic_cast <TStructNode*>( args[0 ]. Get () );
3447+ auto structNode = args[0 ]-> GetStructNode ( );
34483448 if (!structNode) {
3449- if (auto callNode = dynamic_cast <TCallNode*>( args[0 ]. Get () )) {
3449+ if (auto callNode = args[0 ]-> GetCallNode ( )) {
34503450 if (callNode->GetOpName () == " AsStruct" ) {
34513451 return BuildUdf (ctx, pos, nameSpace, name, makeUdfArgs ());
34523452 }
@@ -3458,7 +3458,7 @@ TNodePtr BuildBuiltinFunc(TContext& ctx, TPosition pos, TString name, const TVec
34583458 for (const auto & item : structNode->GetExprs ()) {
34593459 const auto & label = item->GetLabel ();
34603460 if (label == " Entities" ) {
3461- auto callNode = dynamic_cast <TCallNode*>(item. Get () );
3461+ auto callNode = item-> GetCallNode ( );
34623462 if (!callNode || callNode->GetOpName () != " AsListMayWarn" ) {
34633463 return new TInvalidBuiltin (pos, TStringBuilder () << name << " entities must be list of strings" );
34643464 }
@@ -3633,14 +3633,14 @@ TNodePtr BuildBuiltinFunc(TContext& ctx, TPosition pos, TString name, const TVec
36333633 if (mustUseNamed && *mustUseNamed) {
36343634 *mustUseNamed = false ;
36353635 YQL_ENSURE (args.size () == 2 );
3636- Y_DEBUG_ABORT_UNLESS (dynamic_cast <TTupleNode*>( args[0 ]. Get () ));
3637- auto posArgs = static_cast <TTupleNode*>( args[0 ]. Get () );
3636+ Y_DEBUG_ABORT_UNLESS (args[0 ]-> GetTupleNode ( ));
3637+ auto posArgs = args[0 ]-> GetTupleNode ( );
36383638 if (posArgs->IsEmpty ()) {
36393639 if (normalizedName == " asstruct" ) {
36403640 return args[1 ];
36413641 } else {
3642- Y_DEBUG_ABORT_UNLESS (dynamic_cast <TStructNode*>( args[1 ]. Get () ));
3643- auto namedArgs = static_cast <TStructNode*>( args[1 ]. Get () );
3642+ Y_DEBUG_ABORT_UNLESS (args[1 ]-> GetStructNode ( ));
3643+ auto namedArgs = args[1 ]-> GetStructNode ( );
36443644 return new TStructTypeNode (pos, namedArgs->GetExprs ());
36453645 }
36463646 }
@@ -3656,9 +3656,9 @@ TNodePtr BuildBuiltinFunc(TContext& ctx, TPosition pos, TString name, const TVec
36563656 *mustUseNamed = false ;
36573657 }
36583658 YQL_ENSURE (args.size () == 2 );
3659- auto posArgs = static_cast <TTupleNode*> (args[0 ]. Get ());
3660- Y_DEBUG_ABORT_UNLESS (dynamic_cast <TTupleNode*>( args[0 ]. Get () ));
3661- Y_DEBUG_ABORT_UNLESS ( dynamic_cast <TStructNode*>( args[1 ]. Get ()) );
3659+ Y_DEBUG_ABORT_UNLESS (args[0 ]-> GetTupleNode ());
3660+ Y_DEBUG_ABORT_UNLESS (args[1 ]-> GetStructNode ( ));
3661+ auto posArgs = args[0 ]-> GetTupleNode ( );
36623662 if (posArgs->GetTupleSize () != 1 ) {
36633663 return new TInvalidBuiltin (pos, TStringBuilder () << " ExpandStruct requires all arguments except first to be named" );
36643664 }
@@ -3743,7 +3743,7 @@ TNodePtr BuildBuiltinFunc(TContext& ctx, TPosition pos, TString name, const TVec
37433743
37443744 if (ns == " datetime2" && name == " Update" ) {
37453745 if (namedArgs) {
3746- TStructNode* castedNamedArgs = dynamic_cast <TStructNode*>(namedArgs. Get () );
3746+ TStructNode* castedNamedArgs = namedArgs-> GetStructNode ( );
37473747 Y_DEBUG_ABORT_UNLESS (castedNamedArgs);
37483748 auto exprs = castedNamedArgs->GetExprs ();
37493749 for (auto & arg : exprs) {
0 commit comments