pg_sql_dummy.cpp 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564
  1. #include <yql/essentials/parser/pg_wrapper/interface/interface.h>
  2. #include <yql/essentials/minikql/computation/mkql_computation_node_pack_impl.h>
  3. #include <yql/essentials/minikql/mkql_buffer.h>
  4. namespace NSQLTranslationPG {
  5. NYql::TAstParseResult PGToYql(const TString& query, const NSQLTranslation::TTranslationSettings& settings, NYql::TStmtParseInfo* stmtParseInfo) {
  6. Y_UNUSED(query);
  7. Y_UNUSED(settings);
  8. Y_UNUSED(stmtParseInfo);
  9. NYql::TAstParseResult result;
  10. result.Issues.AddIssue(NYql::TIssue("PostgreSQL parser is not available"));
  11. return result;
  12. }
  13. TVector<NYql::TAstParseResult> PGToYqlStatements(const TString& query, const NSQLTranslation::TTranslationSettings& settings, TVector<NYql::TStmtParseInfo>* stmtParseInfo) {
  14. Y_UNUSED(query);
  15. Y_UNUSED(settings);
  16. Y_UNUSED(stmtParseInfo);
  17. return {};
  18. }
  19. std::unique_ptr<NYql::NPg::IExtensionSqlParser> CreateExtensionSqlParser() {
  20. throw yexception() << "CreateExtensionSqlParser: PG types are not supported";
  21. }
  22. std::unique_ptr<NYql::NPg::ISystemFunctionsParser> CreateSystemFunctionsParser() {
  23. throw yexception() << "CreateSystemFunctionsParser: PG types are not supported";
  24. }
  25. std::unique_ptr<NYql::NPg::ISqlLanguageParser> CreateSqlLanguageParser() {
  26. throw yexception() << "CreateSqlLanguageParser: PG types are not supported";
  27. }
  28. } // NSQLTranslationPG
  29. namespace NYql {
  30. namespace NCommon {
  31. TString PgValueToString(const NUdf::TUnboxedValuePod& value, ui32 pgTypeId) {
  32. Y_UNUSED(value);
  33. Y_UNUSED(pgTypeId);
  34. throw yexception() << "PgValueToString: PG types are not supported";
  35. }
  36. NUdf::TUnboxedValue PgValueFromString(const TStringBuf text, ui32 pgTypeId) {
  37. Y_UNUSED(text);
  38. Y_UNUSED(pgTypeId);
  39. throw yexception() << "PgValueFromString: PG types are not supported";
  40. }
  41. TString PgValueToNativeText(const NUdf::TUnboxedValuePod& value, ui32 pgTypeId) {
  42. Y_UNUSED(value);
  43. Y_UNUSED(pgTypeId);
  44. throw yexception() << "PgValueToNativeText: PG types are not supported";
  45. }
  46. NUdf::TUnboxedValue PgValueFromNativeText(const TStringBuf text, ui32 pgTypeId) {
  47. Y_UNUSED(text);
  48. Y_UNUSED(pgTypeId);
  49. throw yexception() << "PgValueFromNativeText: PG types are not supported";
  50. }
  51. TString PgValueToNativeBinary(const NUdf::TUnboxedValuePod& value, ui32 pgTypeId) {
  52. Y_UNUSED(value);
  53. Y_UNUSED(pgTypeId);
  54. throw yexception() << "PgValueToNativeBinary: PG types are not supported";
  55. }
  56. NUdf::TUnboxedValue PgValueFromNativeBinary(const TStringBuf binary, ui32 pgTypeId) {
  57. Y_UNUSED(binary);
  58. Y_UNUSED(pgTypeId);
  59. throw yexception() << "PgValueFromNativeBinary: PG types are not supported";
  60. }
  61. TString PgValueCoerce(const NUdf::TUnboxedValuePod& value, ui32 pgTypeId, i32 typMod, TMaybe<TString>* error) {
  62. Y_UNUSED(value);
  63. Y_UNUSED(pgTypeId);
  64. Y_UNUSED(typMod);
  65. Y_UNUSED(error);
  66. throw yexception() << "PgValueCoerce: PG types are not supported";
  67. }
  68. void WriteYsonValuePg(NResult::TYsonResultWriter& writer, const NUdf::TUnboxedValuePod& value, NKikimr::NMiniKQL::TPgType* type,
  69. const TVector<ui32>* structPositions) {
  70. Y_UNUSED(writer);
  71. Y_UNUSED(value);
  72. Y_UNUSED(type);
  73. Y_UNUSED(structPositions);
  74. throw yexception() << "WriteYsonValuePg: PG types are not supported";
  75. }
  76. void WriteYsonValueInTableFormatPg(TOutputBuf& buf, NKikimr::NMiniKQL::TPgType* type, const NKikimr::NUdf::TUnboxedValuePod& value, bool topLevel) {
  77. Y_UNUSED(buf);
  78. Y_UNUSED(type);
  79. Y_UNUSED(value);
  80. Y_UNUSED(topLevel);
  81. throw yexception() << "WriteYsonValueInTableFormatPg: PG types are not supported";
  82. }
  83. NUdf::TUnboxedValue ReadYsonValueInTableFormatPg(NKikimr::NMiniKQL::TPgType* type, char cmd, TInputBuf& buf) {
  84. Y_UNUSED(type);
  85. Y_UNUSED(cmd);
  86. Y_UNUSED(buf);
  87. throw yexception() << "ReadYsonValueInTableFormatPg: PG types are not supported";
  88. }
  89. NUdf::TUnboxedValue ReadYsonValuePg(NKikimr::NMiniKQL::TPgType* type, char cmd, TInputBuf& buf) {
  90. Y_UNUSED(type);
  91. Y_UNUSED(cmd);
  92. Y_UNUSED(buf);
  93. throw yexception() << "ReadYsonValuePg: PG types are not supported";
  94. }
  95. void SkipSkiffPg(NKikimr::NMiniKQL::TPgType* type, NCommon::TInputBuf& buf) {
  96. Y_UNUSED(type);
  97. Y_UNUSED(buf);
  98. throw yexception() << "SkipSkiffPg: PG types are not supported";
  99. }
  100. NKikimr::NUdf::TUnboxedValue ReadSkiffPg(NKikimr::NMiniKQL::TPgType* type, NCommon::TInputBuf& buf) {
  101. Y_UNUSED(type);
  102. Y_UNUSED(buf);
  103. throw yexception() << "ReadSkiffPg: PG types are not supported";
  104. }
  105. void WriteSkiffPg(NKikimr::NMiniKQL::TPgType* type, const NKikimr::NUdf::TUnboxedValuePod& value, NCommon::TOutputBuf& buf) {
  106. Y_UNUSED(type);
  107. Y_UNUSED(value);
  108. Y_UNUSED(buf);
  109. throw yexception() << "WriteSkiffPg: PG types are not supported";
  110. }
  111. extern "C" void ReadSkiffPgValue(NKikimr::NMiniKQL::TPgType* type, NKikimr::NUdf::TUnboxedValue& value, NCommon::TInputBuf& buf) {
  112. Y_UNUSED(type);
  113. Y_UNUSED(value);
  114. Y_UNUSED(buf);
  115. throw yexception() << "ReadSkiffPgValue: PG types are not supported";
  116. }
  117. extern "C" void WriteSkiffPgValue(NKikimr::NMiniKQL::TPgType* type, const NKikimr::NUdf::TUnboxedValuePod& value, NCommon::TOutputBuf& buf) {
  118. Y_UNUSED(type);
  119. Y_UNUSED(value);
  120. Y_UNUSED(buf);
  121. throw yexception() << "WriteSkiffPgValue: PG types are not supported";
  122. }
  123. } // namespace NCommon
  124. } // NYql
  125. namespace NKikimr {
  126. namespace NMiniKQL {
  127. void* PgInitializeMainContext() {
  128. return nullptr;
  129. }
  130. void PgDestroyMainContext(void* ctx) {
  131. Y_UNUSED(ctx);
  132. }
  133. void PgAcquireThreadContext(void* ctx) {
  134. Y_UNUSED(ctx);
  135. }
  136. void PgReleaseThreadContext(void* ctx) {
  137. Y_UNUSED(ctx);
  138. }
  139. void PgSetGUCSettings(void* ctx, const TGUCSettings::TPtr& GUCSettings) {
  140. Y_UNUSED(ctx);
  141. Y_UNUSED(GUCSettings);
  142. }
  143. std::unique_ptr<NYql::NPg::IExtensionLoader> CreateExtensionLoader() {
  144. throw yexception() << "PG types are not supported";
  145. }
  146. std::optional<std::string> PGGetGUCSetting(const std::string& key) {
  147. Y_UNUSED(key);
  148. throw yexception() << "PG types are not supported";
  149. }
  150. ui64 PgValueSize(const NUdf::TUnboxedValuePod& value, i32 typeLen) {
  151. Y_UNUSED(typeLen);
  152. Y_UNUSED(value);
  153. throw yexception() << "PG types are not supported";
  154. }
  155. ui64 PgValueSize(ui32 type, const NUdf::TUnboxedValuePod& value) {
  156. Y_UNUSED(type);
  157. Y_UNUSED(value);
  158. throw yexception() << "PG types are not supported";
  159. }
  160. ui64 PgValueSize(const TPgType* type, const NUdf::TUnboxedValuePod& value) {
  161. Y_UNUSED(type);
  162. Y_UNUSED(value);
  163. throw yexception() << "PG types are not supported";
  164. }
  165. void PGPackImpl(bool stable, const TPgType* type, const NUdf::TUnboxedValuePod& value, TBuffer& buf) {
  166. Y_UNUSED(stable);
  167. Y_UNUSED(type);
  168. Y_UNUSED(value);
  169. Y_UNUSED(buf);
  170. throw yexception() << "PG types are not supported";
  171. }
  172. void PGPackImpl(bool stable, const TPgType* type, const NUdf::TUnboxedValuePod& value, NKikimr::NMiniKQL::TPagedBuffer& buf) {
  173. Y_UNUSED(stable);
  174. Y_UNUSED(type);
  175. Y_UNUSED(value);
  176. Y_UNUSED(buf);
  177. throw yexception() << "PG types are not supported";
  178. }
  179. NUdf::TUnboxedValue PGUnpackImpl(const TPgType* type, TStringBuf& buf) {
  180. Y_UNUSED(type);
  181. Y_UNUSED(buf);
  182. throw yexception() << "PG types are not supported";
  183. }
  184. NUdf::TUnboxedValue PGUnpackImpl(const TPgType* type, NDetails::TChunkedInputBuffer& buf) {
  185. Y_UNUSED(type);
  186. Y_UNUSED(buf);
  187. throw yexception() << "PG types are not supported";
  188. }
  189. void EncodePresortPGValue(TPgType* type, const NUdf::TUnboxedValue& value, TVector<ui8>& output) {
  190. Y_UNUSED(type);
  191. Y_UNUSED(value);
  192. Y_UNUSED(output);
  193. throw yexception() << "PG types are not supported";
  194. }
  195. NUdf::TUnboxedValue DecodePresortPGValue(TPgType* type, TStringBuf& input, TVector<ui8>& buffer) {
  196. Y_UNUSED(type);
  197. Y_UNUSED(input);
  198. Y_UNUSED(buffer);
  199. throw yexception() << "PG types are not supported";
  200. }
  201. void* PgInitializeContext(const std::string_view& contextType) {
  202. Y_UNUSED(contextType);
  203. return nullptr;
  204. }
  205. void PgDestroyContext(const std::string_view& contextType, void* ctx) {
  206. Y_UNUSED(contextType);
  207. Y_UNUSED(ctx);
  208. }
  209. NUdf::IHash::TPtr MakePgHash(const NMiniKQL::TPgType* type) {
  210. Y_UNUSED(type);
  211. throw yexception() << "PG types are not supported";
  212. }
  213. NUdf::ICompare::TPtr MakePgCompare(const NMiniKQL::TPgType* type) {
  214. Y_UNUSED(type);
  215. throw yexception() << "PG types are not supported";
  216. }
  217. NUdf::IEquate::TPtr MakePgEquate(const NMiniKQL::TPgType* type) {
  218. Y_UNUSED(type);
  219. throw yexception() << "PG types are not supported";
  220. }
  221. NUdf::IBlockItemComparator::TPtr MakePgItemComparator(ui32 typeId) {
  222. Y_UNUSED(typeId);
  223. throw yexception() << "PG types are not supported";
  224. }
  225. NUdf::IBlockItemHasher::TPtr MakePgItemHasher(ui32 typeId) {
  226. Y_UNUSED(typeId);
  227. throw yexception() << "PG types are not supported";
  228. }
  229. void RegisterPgBlockAggs(THashMap<TString, std::unique_ptr<IBlockAggregatorFactory>>& registry) {
  230. Y_UNUSED(registry);
  231. }
  232. } // namespace NMiniKQL
  233. } // namespace NKikimr
  234. namespace NYql {
  235. arrow::Datum MakePgScalar(NKikimr::NMiniKQL::TPgType* type, const NKikimr::NUdf::TUnboxedValuePod& value, arrow::MemoryPool& pool) {
  236. Y_UNUSED(type);
  237. Y_UNUSED(value);
  238. Y_UNUSED(pool);
  239. return arrow::Datum();
  240. }
  241. arrow::Datum MakePgScalar(NKikimr::NMiniKQL::TPgType* type, const NUdf::TBlockItem& value, arrow::MemoryPool& pool) {
  242. Y_UNUSED(type);
  243. Y_UNUSED(value);
  244. Y_UNUSED(pool);
  245. return arrow::Datum();
  246. }
  247. TColumnConverter BuildPgColumnConverter(const std::shared_ptr<arrow::DataType>& originalType, NKikimr::NMiniKQL::TPgType* targetType) {
  248. Y_UNUSED(originalType);
  249. Y_UNUSED(targetType);
  250. return {};
  251. }
  252. ui32 ConvertToPgType(NKikimr::NUdf::EDataSlot slot) {
  253. Y_UNUSED(slot);
  254. throw yexception() << "PG types are not supported";
  255. }
  256. TMaybe<NKikimr::NUdf::EDataSlot> ConvertFromPgType(ui32 typeId) {
  257. Y_UNUSED(typeId);
  258. return Nothing();
  259. }
  260. bool ParsePgIntervalModifier(const TString& str, i32& ret) {
  261. Y_UNUSED(str);
  262. Y_UNUSED(ret);
  263. return false;
  264. }
  265. class TPgDummyBuilder : public NUdf::IPgBuilder {
  266. public:
  267. NUdf::TUnboxedValue ValueFromText(ui32 typeId, const NUdf::TStringRef& value, NUdf::TStringValue& error) const override {
  268. Y_UNUSED(typeId);
  269. Y_UNUSED(value);
  270. error = NUdf::TStringValue(TStringBuf("TPgDummyBuilder::ValueFromText does nothing"));
  271. return NUdf::TUnboxedValue();
  272. }
  273. NUdf::TUnboxedValue ValueFromBinary(ui32 typeId, const NUdf::TStringRef& value, NUdf::TStringValue& error) const override {
  274. Y_UNUSED(typeId);
  275. Y_UNUSED(value);
  276. error = NUdf::TStringValue(TStringBuf("TPgDummyBuilder::ValueFromBinary does nothing"));
  277. return NUdf::TUnboxedValue();
  278. }
  279. NUdf::TUnboxedValue ConvertFromPg(NUdf::TUnboxedValue source, ui32 sourceTypeId, const NUdf::TType* targetType) const override {
  280. Y_UNUSED(source);
  281. Y_UNUSED(sourceTypeId);
  282. Y_UNUSED(targetType);
  283. ythrow yexception() << "TPgDummyBuilder::ConvertFromPg does nothing";
  284. }
  285. NUdf::TUnboxedValue ConvertToPg(NUdf::TUnboxedValue source, const NUdf::TType* sourceType, ui32 targetTypeId) const override {
  286. Y_UNUSED(source);
  287. Y_UNUSED(sourceType);
  288. Y_UNUSED(targetTypeId);
  289. ythrow yexception() << "TPgDummyBuilder::ConvertToPg does nothing";
  290. }
  291. NUdf::TUnboxedValue NewString(i32 typeLen, ui32 targetTypeId, NUdf::TStringRef data) const override {
  292. Y_UNUSED(typeLen);
  293. Y_UNUSED(targetTypeId);
  294. Y_UNUSED(data);
  295. ythrow yexception() << "TPgDummyBuilder::NewString does nothing";
  296. }
  297. NUdf::TStringRef AsCStringBuffer(const NUdf::TUnboxedValue& value) const override {
  298. Y_UNUSED(value);
  299. ythrow yexception() << "TPgDummyBuilder::AsCStringBuffer does nothing";
  300. }
  301. NUdf::TStringRef AsTextBuffer(const NUdf::TUnboxedValue& value) const override {
  302. Y_UNUSED(value);
  303. ythrow yexception() << "TPgDummyBuilder::AsTextBuffer does nothing";
  304. }
  305. NUdf::TUnboxedValue MakeCString(const char* value) const override {
  306. Y_UNUSED(value);
  307. ythrow yexception() << "TPgDummyBuilder::MakeCString does nothing";
  308. }
  309. NUdf::TUnboxedValue MakeText(const char* value) const override {
  310. Y_UNUSED(value);
  311. ythrow yexception() << "TPgDummyBuilder::MakeText does nothing";
  312. }
  313. NUdf::TStringRef AsFixedStringBuffer(const NUdf::TUnboxedValue& value, ui32 length) const override {
  314. Y_UNUSED(value);
  315. Y_UNUSED(length);
  316. ythrow yexception() << "TPgDummyBuilder::AsFixedStringBuffer does nothing";
  317. }
  318. };
  319. std::unique_ptr<NUdf::IPgBuilder> CreatePgBuilder() {
  320. return std::make_unique<TPgDummyBuilder>();
  321. }
  322. bool HasPgKernel(ui32 procOid) {
  323. Y_UNUSED(procOid);
  324. return false;
  325. }
  326. std::function<NKikimr::NMiniKQL::IComputationNode* (NKikimr::NMiniKQL::TCallable&,
  327. const NKikimr::NMiniKQL::TComputationNodeFactoryContext&)> GetPgFactory()
  328. {
  329. return [] (
  330. NKikimr::NMiniKQL::TCallable& callable,
  331. const NKikimr::NMiniKQL::TComputationNodeFactoryContext& ctx
  332. ) -> NKikimr::NMiniKQL::IComputationNode* {
  333. Y_UNUSED(callable);
  334. Y_UNUSED(ctx);
  335. return nullptr;
  336. };
  337. }
  338. IOptimizer* MakePgOptimizerInternal(const IOptimizer::TInput& input, const std::function<void(const TString&)>& log)
  339. {
  340. Y_UNUSED(input);
  341. Y_UNUSED(log);
  342. ythrow yexception() << "PgJoinSearch does nothing";
  343. }
  344. IOptimizerNew* MakePgOptimizerNew(IProviderContext& pctx, TExprContext& ctx, const std::function<void(const TString&)>& log)
  345. {
  346. Y_UNUSED(pctx);
  347. Y_UNUSED(ctx);
  348. Y_UNUSED(log);
  349. ythrow yexception() << "PgJoinSearch does nothing";
  350. }
  351. } // NYql
  352. namespace NKikimr::NPg {
  353. ui32 PgTypeIdFromTypeDesc(const ITypeDesc* typeDesc) {
  354. Y_UNUSED(typeDesc);
  355. return 0;
  356. }
  357. const ITypeDesc* TypeDescFromPgTypeId(ui32 pgTypeId) {
  358. Y_UNUSED(pgTypeId);
  359. return {};
  360. }
  361. TString PgTypeNameFromTypeDesc(const ITypeDesc* typeDesc, const TString& typeMod) {
  362. Y_UNUSED(typeDesc);
  363. Y_UNUSED(typeMod);
  364. return "";
  365. }
  366. const ITypeDesc* TypeDescFromPgTypeName(const TStringBuf name) {
  367. Y_UNUSED(name);
  368. return {};
  369. }
  370. TString TypeModFromPgTypeName(const TStringBuf name) {
  371. Y_UNUSED(name);
  372. return {};
  373. }
  374. bool TypeDescIsComparable(const ITypeDesc* typeDesc) {
  375. Y_UNUSED(typeDesc);
  376. throw yexception() << "PG types are not supported";
  377. }
  378. i32 TypeDescGetTypeLen(const ITypeDesc* typeDesc) {
  379. Y_UNUSED(typeDesc);
  380. throw yexception() << "PG types are not supported";
  381. }
  382. ui32 TypeDescGetStoredSize(const ITypeDesc* typeDesc) {
  383. Y_UNUSED(typeDesc);
  384. throw yexception() << "PG types are not supported";
  385. }
  386. bool TypeDescNeedsCoercion(const ITypeDesc* typeDesc) {
  387. Y_UNUSED(typeDesc);
  388. throw yexception() << "PG types are not supported";
  389. }
  390. int PgNativeBinaryCompare(const char* dataL, size_t sizeL, const char* dataR, size_t sizeR, const ITypeDesc* typeDesc) {
  391. Y_UNUSED(dataL);
  392. Y_UNUSED(sizeL);
  393. Y_UNUSED(dataR);
  394. Y_UNUSED(sizeR);
  395. Y_UNUSED(typeDesc);
  396. throw yexception() << "PG types are not supported";
  397. }
  398. ui64 PgNativeBinaryHash(const char* data, size_t size, const ITypeDesc* typeDesc) {
  399. Y_UNUSED(data);
  400. Y_UNUSED(size);
  401. Y_UNUSED(typeDesc);
  402. throw yexception() << "PG types are not supported";
  403. }
  404. TTypeModResult BinaryTypeModFromTextTypeMod(const TString& str, const ITypeDesc* typeDesc) {
  405. Y_UNUSED(str);
  406. Y_UNUSED(typeDesc);
  407. throw yexception() << "PG types are not supported";
  408. }
  409. TMaybe<TString> PgNativeBinaryValidate(const TStringBuf binary, const ITypeDesc* typeDesc) {
  410. Y_UNUSED(binary);
  411. Y_UNUSED(typeDesc);
  412. throw yexception() << "PG types are not supported";
  413. }
  414. TCoerceResult PgNativeBinaryCoerce(const TStringBuf binary, const ITypeDesc* typeDesc, i32 typmod) {
  415. Y_UNUSED(binary);
  416. Y_UNUSED(typeDesc);
  417. Y_UNUSED(typmod);
  418. throw yexception() << "PG types are not supported";
  419. }
  420. TConvertResult PgNativeBinaryFromNativeText(const TString& str, const ITypeDesc* typeDesc) {
  421. Y_UNUSED(str);
  422. Y_UNUSED(typeDesc);
  423. throw yexception() << "PG types are not supported";
  424. }
  425. TConvertResult PgNativeBinaryFromNativeText(const TString& str, ui32 pgTypeId) {
  426. Y_UNUSED(str);
  427. Y_UNUSED(pgTypeId);
  428. throw yexception() << "PG types are not supported";
  429. }
  430. TConvertResult PgNativeTextFromNativeBinary(const TStringBuf binary, const ITypeDesc* typeDesc) {
  431. Y_UNUSED(binary);
  432. Y_UNUSED(typeDesc);
  433. throw yexception() << "PG types are not supported";
  434. }
  435. TConvertResult PgNativeTextFromNativeBinary(const TStringBuf binary, ui32 pgTypeId) {
  436. Y_UNUSED(binary);
  437. Y_UNUSED(pgTypeId);
  438. throw yexception() << "PG types are not supported";
  439. }
  440. TString GetPostgresServerVersionNum() {
  441. return "-1";
  442. }
  443. TString GetPostgresServerVersionStr() {
  444. return "pg_sql_dummy";
  445. }
  446. } // namespace NKikimr::NPg
  447. namespace NYql {
  448. ui64 HexEncode(const char *src, size_t len, char *dst) {
  449. Y_UNUSED(src);
  450. Y_UNUSED(len);
  451. Y_UNUSED(dst);
  452. throw yexception() << "HexEncode in pg_dummy does nothing";
  453. }
  454. std::unique_ptr<IYtColumnConverter> BuildPgTopLevelColumnReader(std::unique_ptr<NKikimr::NUdf::IArrayBuilder>&& /* builder */, const NKikimr::NMiniKQL::TPgType* /* targetType */) {
  455. throw yexception() << "PG types are not supported";
  456. }
  457. std::unique_ptr<IYsonComplexTypeReader> BuildPgYsonColumnReader(const NUdf::TPgTypeDescription& /* desc */) {
  458. throw yexception() << "PG types are not supported";
  459. }
  460. } // NYql