@@ -249,11 +249,11 @@ struct TExecutionOptions {
249
249
ythrow yexception () << " Trace opt id allowed only for trace opt type script (used " << runnerOptions.TraceOptType << " )" ;
250
250
}
251
251
252
- const ui64 numberScripts = ScriptQueries.size () * LoopCount;
253
- if (*traceOptId >= numberScripts ) {
254
- ythrow yexception () << " Invalid trace opt id " << *traceOptId << " , it should be less than number of scipt queries " << numberScripts ;
252
+ const ui64 scriptNumber = ScriptQueries.size () * LoopCount;
253
+ if (*traceOptId >= scriptNumber ) {
254
+ ythrow yexception () << " Invalid trace opt id " << *traceOptId << " , it should be less than number of script queries " << scriptNumber ;
255
255
}
256
- if (numberScripts == 1 ) {
256
+ if (scriptNumber == 1 ) {
257
257
Cout << colors.Red () << " Warning: trace opt id is not necessary for single script mode" << Endl;
258
258
}
259
259
}
@@ -546,10 +546,9 @@ class TMain : public TMainClassArgs {
546
546
if (tableName.empty () || filePath.empty ()) {
547
547
ythrow
yexception () <<
" Incorrect table mapping, expected form table@file, e. g. yt.Root/[email protected] " ;
548
548
}
549
- if (TablesMapping.contains (tableName) ) {
549
+ if (! TablesMapping.emplace (tableName, filePath). second ) {
550
550
ythrow yexception () << " Got duplicated table name: " << tableName;
551
551
}
552
- TablesMapping[tableName] = filePath;
553
552
});
554
553
555
554
options.AddLongOption (' c' , " app-config" , " File with app config (TAppConfig for ydb tenant)" )
@@ -614,15 +613,14 @@ class TMain : public TMainClassArgs {
614
613
ythrow yexception () << " Incorrect log setting, expected form component=priority, e. g. KQP_YQL=trace" ;
615
614
}
616
615
617
- const auto service = GetLogService (TString (component));
618
- if (LogPriorities.contains (service)) {
619
- ythrow yexception () << " Got duplicated log service name: " << component;
620
- }
621
-
622
616
if (!logPriority.Contains (TString (priority))) {
623
617
ythrow yexception () << " Incorrect log priority: " << priority;
624
618
}
625
- LogPriorities[service] = logPriority (TString (priority));
619
+
620
+ const auto service = GetLogService (TString (component));
621
+ if (!LogPriorities.emplace (service, logPriority (TString (priority))).second ) {
622
+ ythrow yexception () << " Got duplicated log service name: " << component;
623
+ }
626
624
});
627
625
628
626
TChoices<TRunnerOptions::ETraceOptType> traceOpt ({
@@ -631,7 +629,7 @@ class TMain : public TMainClassArgs {
631
629
{" script" , TRunnerOptions::ETraceOptType::Script},
632
630
{" disabled" , TRunnerOptions::ETraceOptType::Disabled}
633
631
});
634
- options.AddLongOption (' T' , " trace-opt" , " Print AST in the begin of each transformation (use script@<query id> for tracing one -p query) " )
632
+ options.AddLongOption (' T' , " trace-opt" , " Print AST in the begin of each transformation" )
635
633
.RequiredArgument (" trace-opt-query" )
636
634
.DefaultValue (" disabled" )
637
635
.Choices (traceOpt.GetChoices ())
0 commit comments