File tree Expand file tree Collapse file tree 2 files changed +19
-4
lines changed
yt/yql/providers/yt/gateway Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -924,8 +924,15 @@ class TYtFileGateway : public IYtGateway {
924
924
if (interval || isDuration) {
925
925
attrs[" expiration_timeout" ] = isDuration ? duration.MilliSeconds () : interval->MilliSeconds ();
926
926
}
927
- if (options.Config ()->NightlyCompress .Get (cluster).GetOrElse (false )) {
928
- attrs[" force_nightly_compress" ] = true ;
927
+ const TMaybe<bool > nightlyCompress = options.Config ()->NightlyCompress .Get (cluster);
928
+ if (nightlyCompress.Defined ()) {
929
+ if (*nightlyCompress) {
930
+ attrs[" force_nightly_compress" ] = true ;
931
+ } else {
932
+ NYT::TNode compressSettings = NYT::TNode::CreateMap ();
933
+ compressSettings[" enabled" ] = false ;
934
+ attrs[" nightly_compression_settings" ] = compressSettings;
935
+ }
929
936
}
930
937
}
931
938
Original file line number Diff line number Diff line change @@ -2533,8 +2533,16 @@ class TYtNativeGateway : public IYtGateway {
2533
2533
yqlAttrs[" expiration_timeout" ] = isDuration ? duration.MilliSeconds ()
2534
2534
: (*interval).MilliSeconds ();
2535
2535
}
2536
- if (execCtx->Options_ .Config ()->NightlyCompress .Get (cluster).GetOrElse (false )) {
2537
- yqlAttrs[" force_nightly_compress" ] = true ;
2536
+ const TMaybe<bool > nightlyCompress =
2537
+ execCtx->Options_ .Config ()->NightlyCompress .Get (cluster);
2538
+ if (nightlyCompress.Defined ()) {
2539
+ if (*nightlyCompress) {
2540
+ yqlAttrs[" force_nightly_compress" ] = true ;
2541
+ } else {
2542
+ NYT::TNode compressSettings = NYT::TNode::CreateMap ();
2543
+ compressSettings[" enabled" ] = false ;
2544
+ yqlAttrs[" nightly_compression_settings" ] = compressSettings;
2545
+ }
2538
2546
}
2539
2547
}
2540
2548
You can’t perform that action at this time.
0 commit comments