File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
ydb/library/yql/providers/yt/provider Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ namespace NYql {
16
16
17
17
using namespace NNodes ;
18
18
19
+ const TString YtProvider_AnonTableName = " YtProvider_AnonTableName" ;
20
+
19
21
class TYtIntentDeterminationTransformer : public TVisitorTransformerBase {
20
22
public:
21
23
TYtIntentDeterminationTransformer (TYtState::TPtr state)
@@ -453,7 +455,22 @@ class TYtIntentDeterminationTransformer : public TVisitorTransformerBase {
453
455
void RegisterAnonymouseTable (const TString& cluster, const TString& label) {
454
456
auto & path = State_->AnonymousLabels [std::make_pair (cluster, label)];
455
457
if (path.empty ()) {
456
- path = " tmp/" + GetGuidAsString (State_->Types ->RandomProvider ->GenGuid ());
458
+ auto & qContext = State_->Types ->QContext ;
459
+ const TString key = cluster + " ." + label;
460
+ if (qContext.CanRead ()) {
461
+ auto res = qContext.GetReader ()->Get ({YtProvider_AnonTableName, key}).GetValueSync ();
462
+ if (!res) {
463
+ ythrow yexception () << " Missing replay data" ;
464
+ }
465
+
466
+ path = res->Value ;
467
+ } else {
468
+ path = " tmp/" + GetGuidAsString (State_->Types ->RandomProvider ->GenGuid ());
469
+ if (qContext.CanWrite ()) {
470
+ qContext.GetWriter ()->Put ({YtProvider_AnonTableName, key}, path).GetValueSync ();
471
+ }
472
+ }
473
+
457
474
YQL_CLOG (INFO, ProviderYt) << " Anonymous label " << cluster << ' .' << label << " : " << path;
458
475
}
459
476
}
You can’t perform that action at this time.
0 commit comments