mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
156 lines
7.0 KiB
Plaintext
156 lines
7.0 KiB
Plaintext
-- { echoOn }
|
||
select substringIndex('www.clickhouse.com', '.', -4);
|
||
www.clickhouse.com
|
||
select substringIndex('www.clickhouse.com', '.', -3);
|
||
www.clickhouse.com
|
||
select substringIndex('www.clickhouse.com', '.', -2);
|
||
clickhouse.com
|
||
select substringIndex('www.clickhouse.com', '.', -1);
|
||
com
|
||
select substringIndex('www.clickhouse.com', '.', 0);
|
||
|
||
select substringIndex('www.clickhouse.com', '.', 1);
|
||
www
|
||
select substringIndex('www.clickhouse.com', '.', 2);
|
||
www.clickhouse
|
||
select substringIndex('www.clickhouse.com', '.', 3);
|
||
www.clickhouse.com
|
||
select substringIndex('www.clickhouse.com', '.', 4);
|
||
www.clickhouse.com
|
||
select substringIndex(materialize('www.clickhouse.com'), '.', -4);
|
||
www.clickhouse.com
|
||
select substringIndex(materialize('www.clickhouse.com'), '.', -3);
|
||
www.clickhouse.com
|
||
select substringIndex(materialize('www.clickhouse.com'), '.', -2);
|
||
clickhouse.com
|
||
select substringIndex(materialize('www.clickhouse.com'), '.', -1);
|
||
com
|
||
select substringIndex(materialize('www.clickhouse.com'), '.', 0);
|
||
|
||
select substringIndex(materialize('www.clickhouse.com'), '.', 1);
|
||
www
|
||
select substringIndex(materialize('www.clickhouse.com'), '.', 2);
|
||
www.clickhouse
|
||
select substringIndex(materialize('www.clickhouse.com'), '.', 3);
|
||
www.clickhouse.com
|
||
select substringIndex(materialize('www.clickhouse.com'), '.', 4);
|
||
www.clickhouse.com
|
||
select substringIndex(materialize('www.clickhouse.com'), '.', materialize(-4));
|
||
www.clickhouse.com
|
||
select substringIndex(materialize('www.clickhouse.com'), '.', materialize(-3));
|
||
www.clickhouse.com
|
||
select substringIndex(materialize('www.clickhouse.com'), '.', materialize(-2));
|
||
clickhouse.com
|
||
select substringIndex(materialize('www.clickhouse.com'), '.', materialize(-1));
|
||
com
|
||
select substringIndex(materialize('www.clickhouse.com'), '.', materialize(0));
|
||
|
||
select substringIndex(materialize('www.clickhouse.com'), '.', materialize(1));
|
||
www
|
||
select substringIndex(materialize('www.clickhouse.com'), '.', materialize(2));
|
||
www.clickhouse
|
||
select substringIndex(materialize('www.clickhouse.com'), '.', materialize(3));
|
||
www.clickhouse.com
|
||
select substringIndex(materialize('www.clickhouse.com'), '.', materialize(4));
|
||
www.clickhouse.com
|
||
select substringIndex('www.clickhouse.com', '.', materialize(-4));
|
||
www.clickhouse.com
|
||
select substringIndex('www.clickhouse.com', '.', materialize(-3));
|
||
www.clickhouse.com
|
||
select substringIndex('www.clickhouse.com', '.', materialize(-2));
|
||
clickhouse.com
|
||
select substringIndex('www.clickhouse.com', '.', materialize(-1));
|
||
com
|
||
select substringIndex('www.clickhouse.com', '.', materialize(0));
|
||
|
||
select substringIndex('www.clickhouse.com', '.', materialize(1));
|
||
www
|
||
select substringIndex('www.clickhouse.com', '.', materialize(2));
|
||
www.clickhouse
|
||
select substringIndex('www.clickhouse.com', '.', materialize(3));
|
||
www.clickhouse.com
|
||
select substringIndex('www.clickhouse.com', '.', materialize(4));
|
||
www.clickhouse.com
|
||
select SUBSTRING_INDEX('www.clickhouse.com', '.', 2);
|
||
www.clickhouse
|
||
select substringIndex('www.clickhouse.com', '..', 2); -- { serverError BAD_ARGUMENTS }
|
||
select substringIndex('www.clickhouse.com', '', 2); -- { serverError BAD_ARGUMENTS }
|
||
select substringIndex('www.clickhouse.com', materialize('.'), 2); -- { serverError ILLEGAL_COLUMN }
|
||
select substringIndex('www.clickhouse.com', '.', cast(2 as Int128)); -- { serverError ILLEGAL_TYPE_OF_ARGUMENT }
|
||
select substringIndexUTF8('富强,民主,文明', ',', -4);
|
||
富强,民主,文明
|
||
select substringIndexUTF8('富强,民主,文明', ',', -3);
|
||
富强,民主,文明
|
||
select substringIndexUTF8('富强,民主,文明', ',', -2);
|
||
民主,文明
|
||
select substringIndexUTF8('富强,民主,文明', ',', -1);
|
||
文明
|
||
select substringIndexUTF8('富强,民主,文明', ',', 0);
|
||
|
||
select substringIndexUTF8('富强,民主,文明', ',', 1);
|
||
富强
|
||
select substringIndexUTF8('富强,民主,文明', ',', 2);
|
||
富强,民主
|
||
select substringIndexUTF8('富强,民主,文明', ',', 3);
|
||
富强,民主,文明
|
||
select substringIndexUTF8('富强,民主,文明', ',', 4);
|
||
富强,民主,文明
|
||
select substringIndexUTF8(materialize('富强,民主,文明'), ',', -4);
|
||
富强,民主,文明
|
||
select substringIndexUTF8(materialize('富强,民主,文明'), ',', -3);
|
||
富强,民主,文明
|
||
select substringIndexUTF8(materialize('富强,民主,文明'), ',', -2);
|
||
民主,文明
|
||
select substringIndexUTF8(materialize('富强,民主,文明'), ',', -1);
|
||
文明
|
||
select substringIndexUTF8(materialize('富强,民主,文明'), ',', 0);
|
||
|
||
select substringIndexUTF8(materialize('富强,民主,文明'), ',', 1);
|
||
富强
|
||
select substringIndexUTF8(materialize('富强,民主,文明'), ',', 2);
|
||
富强,民主
|
||
select substringIndexUTF8(materialize('富强,民主,文明'), ',', 3);
|
||
富强,民主,文明
|
||
select substringIndexUTF8(materialize('富强,民主,文明'), ',', 4);
|
||
富强,民主,文明
|
||
select substringIndexUTF8('富强,民主,文明', ',', materialize(-4));
|
||
富强,民主,文明
|
||
select substringIndexUTF8('富强,民主,文明', ',', materialize(-3));
|
||
富强,民主,文明
|
||
select substringIndexUTF8('富强,民主,文明', ',', materialize(-2));
|
||
民主,文明
|
||
select substringIndexUTF8('富强,民主,文明', ',', materialize(-1));
|
||
文明
|
||
select substringIndexUTF8('富强,民主,文明', ',', materialize(0));
|
||
|
||
select substringIndexUTF8('富强,民主,文明', ',', materialize(1));
|
||
富强
|
||
select substringIndexUTF8('富强,民主,文明', ',', materialize(2));
|
||
富强,民主
|
||
select substringIndexUTF8('富强,民主,文明', ',', materialize(3));
|
||
富强,民主,文明
|
||
select substringIndexUTF8('富强,民主,文明', ',', materialize(4));
|
||
富强,民主,文明
|
||
select substringIndexUTF8(materialize('富强,民主,文明'), ',', materialize(-4));
|
||
富强,民主,文明
|
||
select substringIndexUTF8(materialize('富强,民主,文明'), ',', materialize(-3));
|
||
富强,民主,文明
|
||
select substringIndexUTF8(materialize('富强,民主,文明'), ',', materialize(-2));
|
||
民主,文明
|
||
select substringIndexUTF8(materialize('富强,民主,文明'), ',', materialize(-1));
|
||
文明
|
||
select substringIndexUTF8(materialize('富强,民主,文明'), ',', materialize(0));
|
||
|
||
select substringIndexUTF8(materialize('富强,民主,文明'), ',', materialize(1));
|
||
富强
|
||
select substringIndexUTF8(materialize('富强,民主,文明'), ',', materialize(2));
|
||
富强,民主
|
||
select substringIndexUTF8(materialize('富强,民主,文明'), ',', materialize(3));
|
||
富强,民主,文明
|
||
select substringIndexUTF8(materialize('富强,民主,文明'), ',', materialize(4));
|
||
富强,民主,文明
|
||
select substringIndexUTF8('富强,民主,文明', ',,', 2); -- { serverError BAD_ARGUMENTS }
|
||
select substringIndexUTF8('富强,民主,文明', '', 2); -- { serverError BAD_ARGUMENTS }
|
||
select substringIndexUTF8('富强,民主,文明', materialize(','), 2); -- { serverError ILLEGAL_COLUMN }
|
||
select substringIndexUTF8('富强,民主,文明', ',', cast(2 as Int128)); -- { serverError ILLEGAL_TYPE_OF_ARGUMENT }
|