@@ -1710,13 +1710,17 @@ class TYtNativeGateway : public IYtGateway {
1710
1710
TGetTablePartitionsResult GetTablePartitions (TGetTablePartitionsOptions&& options) override {
1711
1711
try {
1712
1712
TSession::TPtr session = GetSession (options.SessionId ());
1713
+ const TString cluster = options.Cluster ();
1714
+ const TString tmpFolder = GetTablesTmpFolder (*options.Config (), cluster);
1713
1715
1714
- auto execCtx = MakeExecCtx (std::move (options), session, options. Cluster () , nullptr , nullptr );
1716
+ auto execCtx = MakeExecCtx (std::move (options), session, cluster , nullptr , nullptr );
1715
1717
auto entry = execCtx->GetOrCreateEntry ();
1716
1718
1717
1719
TVector<NYT::TRichYPath> paths;
1718
1720
for (const auto & pathInfo: execCtx->Options_ .Paths ()) {
1719
- const TString tmpFolder = GetTablesTmpFolder (*options.Config (), pathInfo->Table ->Cluster );
1721
+ YQL_ENSURE (pathInfo->Table ->Cluster == cluster,
1722
+ " Remote tables are not supported in GetTablePartitions(): requested cluster " << pathInfo->Table ->Cluster .Quote () <<
1723
+ " , runtime cluster: " << cluster.Quote ());
1720
1724
const auto tablePath = TransformPath (tmpFolder, pathInfo->Table ->Name , pathInfo->Table ->IsTemp , session->UserName_ );
1721
1725
NYT::TRichYPath richYtPath{NYT::AddPathPrefix (tablePath, NYT::TConfig::Get ()->Prefix )};
1722
1726
if (!pathInfo->Table ->IsTemp || pathInfo->Table ->IsAnonymous ) {
0 commit comments