Skip to content

Commit d07fb05

Browse files
authored
YQL query dumper - fail dump if DQ uses files (#27628)
1 parent fc69c51 commit d07fb05

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

ydb/library/yql/providers/dq/provider/exec/yql_dq_exectransformer.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -768,6 +768,12 @@ class TDqExecTransformer: public TExecTransformerBase, TCounters
768768
return filesRes;
769769
}
770770
FlushCounter("FreezeUsedFiles");
771+
772+
auto& qContext = State->TypeCtx->QContext;
773+
if (qContext.CanWrite() && qContext.CaptureMode() == EQPlayerCaptureMode::Full && !files.empty()) {
774+
YQL_CLOG(DEBUG, ProviderDq) << "DQ full capture has not been taken: file dump is unsupported";
775+
State->IsFullCaptureReady = false;
776+
}
771777
// copy-paste }
772778

773779
TScopedAlloc alloc(__LOCATION__, NKikimr::TAlignedPagePoolCounters(), State->FunctionRegistry->SupportsSizedAllocators());
@@ -1347,6 +1353,12 @@ class TDqExecTransformer: public TExecTransformerBase, TCounters
13471353
return filesRes;
13481354
}
13491355
FlushCounter("FreezeUsedFiles");
1356+
1357+
auto& qContext = State->TypeCtx->QContext;
1358+
if (qContext.CanWrite() && qContext.CaptureMode() == EQPlayerCaptureMode::Full && !files.empty()) {
1359+
YQL_CLOG(DEBUG, ProviderDq) << "DQ full capture has not been taken: file dump is unsupported";
1360+
State->IsFullCaptureReady = false;
1361+
}
13501362
// copy-paste }
13511363

13521364
THashMap<TString, TString> secureParams;
@@ -1900,6 +1912,12 @@ class TDqExecTransformer: public TExecTransformerBase, TCounters
19001912
continue;
19011913
}
19021914
FlushCounter("FreezeUsedFiles");
1915+
1916+
auto& qContext = State->TypeCtx->QContext;
1917+
if (qContext.CanWrite() && qContext.CaptureMode() == EQPlayerCaptureMode::Full && !files.empty()) {
1918+
YQL_CLOG(DEBUG, ProviderDq) << "DQ full capture has not been taken: file dump is unsupported";
1919+
State->IsFullCaptureReady = false;
1920+
}
19031921
// copy-paste }
19041922

19051923
auto settings = std::make_shared<TDqSettings>(*commonSettings);

ydb/library/yql/providers/dq/provider/yql_dq_datasink.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,10 @@ class TDqDataProviderSink: public TDataProviderBase {
223223
}
224224
}
225225

226+
bool IsFullCaptureReady() override {
227+
return State->IsFullCaptureReady;
228+
}
229+
226230
const TDqState::TPtr State;
227231

228232
TLazyInitHolder<IGraphTransformer> LogOptTransformer;

ydb/library/yql/providers/dq/provider/yql_dq_state.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ struct TDqState: public TThrRefBase {
3333
const TString VanillaJobMd5;
3434
TDqConfiguration::TPtr Settings = MakeIntrusive<TDqConfiguration>();
3535
bool ExternalUser;
36+
bool IsFullCaptureReady = true;
3637

3738
TMutex Mutex;
3839
THashMap<ui32, TOperationStatistics> Statistics;

0 commit comments

Comments
 (0)