You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
INDEX Index1 GLOBAL SYNC ON (Key2, Value1, Value2),
1890
+
PRIMARY KEY (Key1, Key2, Key3)
1891
+
);
1892
+
ALTER TABLE test_show_create ALTER INDEX Index1 SET (
1893
+
AUTO_PARTITIONING_BY_LOAD = ENABLED,
1894
+
AUTO_PARTITIONING_MAX_PARTITIONS_COUNT = 5000
1895
+
);
1896
+
)", "test_show_create",
1897
+
R"(CREATE TABLE `test_show_create` (
1898
+
`Key1` Int64 NOT NULL,
1899
+
`Key2` Utf8 NOT NULL,
1900
+
`Key3` pgint2 NOT NULL,
1901
+
`Value1` Utf8,
1902
+
`Value2` Bool,
1903
+
`Value3` String,
1904
+
INDEX `Index1` GLOBAL SYNC ON (`Key2`, `Value1`, `Value2`),
1905
+
PRIMARY KEY (`Key1`, `Key2`, `Key3`)
1906
+
);
1907
+
1908
+
ALTER TABLE `test_show_create`
1909
+
ALTER INDEX `Index1` SET (AUTO_PARTITIONING_BY_LOAD = ENABLED, AUTO_PARTITIONING_MAX_PARTITIONS_COUNT = 5000)
1910
+
;
1911
+
)"
1912
+
);
1913
+
1914
+
checker.CheckShowCreateTable(R"(
1915
+
CREATE TABLE test_show_create (
1916
+
Key1 Int64 NOT NULL DEFAULT -100,
1917
+
Key2 Utf8 NOT NULL,
1918
+
Key3 BigSerial NOT NULL,
1919
+
Value1 Utf8 FAMILY Family1,
1920
+
Value2 Bool FAMILY Family2,
1921
+
Value3 String FAMILY Family2,
1922
+
INDEX Index1 GLOBAL ASYNC ON (Key2, Value1, Value2),
1923
+
INDEX Index2 GLOBAL ASYNC ON (Key3, Value2) COVER (Value1, Value3),
1924
+
PRIMARY KEY (Key1, Key2, Key3),
1925
+
FAMILY Family1 (
1926
+
DATA = "test0",
1927
+
COMPRESSION = "off"
1928
+
),
1929
+
FAMILY Family2 (
1930
+
DATA = "test1",
1931
+
COMPRESSION = "lz4"
1932
+
)
1933
+
) WITH (
1934
+
AUTO_PARTITIONING_PARTITION_SIZE_MB = 1000
1935
+
);
1936
+
ALTER TABLE test_show_create ALTER INDEX Index1 SET (
1937
+
AUTO_PARTITIONING_BY_LOAD = ENABLED,
1938
+
AUTO_PARTITIONING_MIN_PARTITIONS_COUNT = 2000
1939
+
);
1940
+
ALTER TABLE test_show_create ALTER INDEX Index2 SET (
1941
+
AUTO_PARTITIONING_BY_SIZE = ENABLED,
1942
+
AUTO_PARTITIONING_MAX_PARTITIONS_COUNT = 100
1943
+
);
1944
+
)", "test_show_create",
1945
+
R"(CREATE TABLE `test_show_create` (
1946
+
`Key1` Int64 NOT NULL DEFAULT -100,
1947
+
`Key2` Utf8 NOT NULL,
1948
+
`Key3` Serial8 NOT NULL,
1949
+
`Value1` Utf8 FAMILY `Family1`,
1950
+
`Value2` Bool FAMILY `Family2`,
1951
+
`Value3` String FAMILY `Family2`,
1952
+
INDEX `Index1` GLOBAL ASYNC ON (`Key2`, `Value1`, `Value2`),
1953
+
INDEX `Index2` GLOBAL ASYNC ON (`Key3`, `Value2`) COVER (`Value1`, `Value3`),
1954
+
FAMILY `Family1` (DATA = 'test0', COMPRESSION = 'off'),
1955
+
FAMILY `Family2` (DATA = 'test1', COMPRESSION = 'lz4'),
1956
+
PRIMARY KEY (`Key1`, `Key2`, `Key3`)
1957
+
)
1958
+
WITH (
1959
+
AUTO_PARTITIONING_BY_SIZE = ENABLED,
1960
+
AUTO_PARTITIONING_PARTITION_SIZE_MB = 1000
1961
+
);
1962
+
1963
+
ALTER TABLE `test_show_create`
1964
+
ALTER INDEX `Index1` SET (AUTO_PARTITIONING_BY_LOAD = ENABLED, AUTO_PARTITIONING_MIN_PARTITIONS_COUNT = 2000)
1965
+
;
1966
+
1967
+
ALTER TABLE `test_show_create`
1968
+
ALTER INDEX `Index2` SET (AUTO_PARTITIONING_MAX_PARTITIONS_COUNT = 100)
1969
+
;
1970
+
)"
1971
+
);
1972
+
1973
+
checker.CheckShowCreateTable(R"(
1974
+
CREATE TABLE test_show_create (
1975
+
Key1 Int64 NOT NULL,
1976
+
Key2 Utf8 NOT NULL,
1977
+
Key3 PgInt2 NOT NULL,
1978
+
Value1 Utf8,
1979
+
Value2 Bool,
1980
+
Value3 String,
1981
+
INDEX Index1 GLOBAL SYNC ON (Key2, Value1, Value2),
1982
+
INDEX Index2 GLOBAL ASYNC ON (Key3, Value1) COVER (Value2, Value3),
1983
+
INDEX Index3 GLOBAL SYNC ON (Key1, Key2, Value1),
1984
+
PRIMARY KEY (Key1, Key2, Key3)
1985
+
);
1986
+
ALTER TABLE test_show_create ALTER INDEX Index1 SET (
1987
+
AUTO_PARTITIONING_BY_LOAD = ENABLED,
1988
+
AUTO_PARTITIONING_MAX_PARTITIONS_COUNT = 5000,
1989
+
AUTO_PARTITIONING_MIN_PARTITIONS_COUNT = 1000
1990
+
);
1991
+
ALTER TABLE test_show_create ALTER INDEX Index2 SET (
1992
+
AUTO_PARTITIONING_BY_SIZE = ENABLED,
1993
+
AUTO_PARTITIONING_PARTITION_SIZE_MB = 10000,
1994
+
AUTO_PARTITIONING_MAX_PARTITIONS_COUNT = 2700
1995
+
);
1996
+
ALTER TABLE test_show_create ALTER INDEX Index3 SET (
1997
+
AUTO_PARTITIONING_BY_SIZE = DISABLED,
1998
+
AUTO_PARTITIONING_MIN_PARTITIONS_COUNT = 3500
1999
+
);
2000
+
)", "test_show_create",
2001
+
R"(CREATE TABLE `test_show_create` (
2002
+
`Key1` Int64 NOT NULL,
2003
+
`Key2` Utf8 NOT NULL,
2004
+
`Key3` pgint2 NOT NULL,
2005
+
`Value1` Utf8,
2006
+
`Value2` Bool,
2007
+
`Value3` String,
2008
+
INDEX `Index1` GLOBAL SYNC ON (`Key2`, `Value1`, `Value2`),
2009
+
INDEX `Index2` GLOBAL ASYNC ON (`Key3`, `Value1`) COVER (`Value2`, `Value3`),
2010
+
INDEX `Index3` GLOBAL SYNC ON (`Key1`, `Key2`, `Value1`),
2011
+
PRIMARY KEY (`Key1`, `Key2`, `Key3`)
2012
+
);
2013
+
2014
+
ALTER TABLE `test_show_create`
2015
+
ALTER INDEX `Index1` SET (AUTO_PARTITIONING_BY_LOAD = ENABLED, AUTO_PARTITIONING_MIN_PARTITIONS_COUNT = 1000, AUTO_PARTITIONING_MAX_PARTITIONS_COUNT = 5000)
2016
+
;
2017
+
2018
+
ALTER TABLE `test_show_create`
2019
+
ALTER INDEX `Index2` SET (AUTO_PARTITIONING_BY_SIZE = ENABLED, AUTO_PARTITIONING_PARTITION_SIZE_MB = 10000, AUTO_PARTITIONING_MAX_PARTITIONS_COUNT = 2700)
2020
+
;
2021
+
2022
+
ALTER TABLE `test_show_create`
2023
+
ALTER INDEX `Index3` SET (AUTO_PARTITIONING_BY_SIZE = DISABLED, AUTO_PARTITIONING_MIN_PARTITIONS_COUNT = 3500)
0 commit comments