@@ -1723,6 +1723,57 @@ value {
1723
1723
TestGetImport (runtime, txId, " /MyRoot" );
1724
1724
}
1725
1725
1726
+ Y_UNIT_TEST (ExportImportDecimalKey) {
1727
+ TTestBasicRuntime runtime;
1728
+ TTestEnv env (runtime, TTestEnvOptions ().EnableTablePgTypes (true ));
1729
+ ui64 txId = 100 ;
1730
+
1731
+ TestCreateTable (runtime, ++txId, " /MyRoot" , R"_(
1732
+ Name: "Table"
1733
+ Columns { Name: "key" Type: "Decimal(2,1)" }
1734
+ Columns { Name: "value" Type: "Decimal(35,10)" }
1735
+ KeyColumnNames: ["key"]
1736
+ )_" );
1737
+ env.TestWaitNotification (runtime, txId);
1738
+
1739
+ const std::pair<ui64, ui64> decimal2 = NYql::NDecimal::MakePair (NYql::NDecimal::FromString (" 32.1" , 2 , 1 ));
1740
+ const std::pair<ui64, ui64> decimal35 = NYql::NDecimal::MakePair (NYql::NDecimal::FromString (" 555555555555555.123456789" , 35 , 10 ));
1741
+ UploadRow (runtime, " /MyRoot/Table" , 0 , {1 }, {2 },
1742
+ {TCell::Make<std::pair<ui64, ui64>>(decimal2)}, {TCell::Make<std::pair<ui64, ui64>>(decimal35)});
1743
+
1744
+ TPortManager portManager;
1745
+ const ui16 port = portManager.GetPort ();
1746
+
1747
+ TS3Mock s3Mock ({}, TS3Mock::TSettings (port));
1748
+ UNIT_ASSERT (s3Mock.Start ());
1749
+
1750
+ TestExport (runtime, ++txId, " /MyRoot" , Sprintf (R"(
1751
+ ExportToS3Settings {
1752
+ endpoint: "localhost:%d"
1753
+ scheme: HTTP
1754
+ items {
1755
+ source_path: "/MyRoot/Table"
1756
+ destination_prefix: "Backup1"
1757
+ }
1758
+ }
1759
+ )" , port));
1760
+ env.TestWaitNotification (runtime, txId);
1761
+ TestGetExport (runtime, txId, " /MyRoot" );
1762
+
1763
+ TestImport (runtime, ++txId, " /MyRoot" , Sprintf (R"(
1764
+ ImportFromS3Settings {
1765
+ endpoint: "localhost:%d"
1766
+ scheme: HTTP
1767
+ items {
1768
+ source_prefix: "Backup1"
1769
+ destination_path: "/MyRoot/Restored"
1770
+ }
1771
+ }
1772
+ )" , port));
1773
+ env.TestWaitNotification (runtime, txId);
1774
+ TestGetImport (runtime, txId, " /MyRoot" );
1775
+ }
1776
+
1726
1777
Y_UNIT_TEST (ExportImportUuid) {
1727
1778
TTestBasicRuntime runtime;
1728
1779
TTestEnv env (runtime, TTestEnvOptions ().EnableTablePgTypes (true ));
0 commit comments