The world's fastest open query engine for sub-second analytics both on and off the data lakehouse. With the flexibility to support nearly any scenario, StarRocks provides best-in-class performance for multi-dimensional analytics, real-time analytics, and ad-hoc queries. A Linux Foundation project.
DROP DATABASE IF EXISTS w0;
CREATE DATABASE w0;
USE w0;
admin set frontend config ("enable_decimal_v3" = "true");
CREATE TABLE IF NOT EXISTS t0 (c_0_0 VARCHAR(31) NULL ,c_0_1 DECIMAL(9, 1) NULL ,c_0_2 ARRAY<INT> NOT NULL ,c_0_3 ARRAY<STRING> NOT NULL ,c_0_4 SMALLINT NULL ) UNIQUE KEY (c_0_0) DISTRIBUTED BY HASH (c_0_0) BUCKETS 3 properties("replication_num"="3") ;
CREATE TABLE IF NOT EXISTS t1 (c_1_0 DECIMAL(8, 5) NULL ,c_1_1 DATETIME NOT NULL ,c_1_2 DECIMAL(7, 5) NOT NULL ,c_1_3 ARRAY<INT> NULL ,c_1_4 DATE NOT NULL ,c_1_5 JSON NULL ,c_1_6 JSON NOT NULL ,c_1_7 BOOLEAN NULL ,c_1_8 BOOLEAN NOT NULL ,c_1_9 ARRAY<STRING> NULL ,c_1_10 ARRAY<INT> NULL ,c_1_11 DATETIME NOT NULL ,c_1_12 VARCHAR(1) NULL ,c_1_13 BIGINT NOT NULL ,c_1_14 BOOLEAN NULL ,c_1_15 LARGEINT NOT NULL ,c_1_16 DECIMAL(33, 13) NOT NULL ) DUPLICATE KEY (c_1_0) DISTRIBUTED BY HASH (c_1_0) BUCKETS 3 properties("replication_num"="3") ;
CREATE TABLE t2 (c_2_0 VARCHAR(21) NULL ,c_2_1 DATE NOT NULL ,c_2_2 DECIMAL(5, 0) NULL ,c_2_3 BIGINT NOT NULL ,c_2_4 ARRAY<STRING> NULL ,c_2_5 INT NULL , INDEX index1_c_2_3(`c_2_3`) USING BITMAP) DUPLICATE KEY (c_2_0,c_2_1,c_2_2,c_2_3) PARTITION BY RANGE(c_2_1) (START ("2010-01-01") END ("2022-12-31") EVERY (INTERVAL 678 day)) DISTRIBUTED BY HASH (c_2_2,c_2_0) BUCKETS 3 properties("replication_num"="3", "bloom_filter_columns"="c_2_3") ;
INSERT INTO t0 VALUES ('JGvhZ', 5109305.7, [275359466, -1538350139, -456036772], ["KaQ", "V", "", "9", "AEDK3dO", "9LhQ", "", "SZOHA", "X"], 10);
INSERT INTO t2 VALUES ('WDEStq3', '2010-01-05', 81156, -431017410, [], 14), ('', '2010-01-12', 32505, -431017410, ["fot", "2"], 22);
INSERT INTO t1 VALUES (0.00009, '2010-01-15 08:00:14', 0.00056, [-1538350139, -1538350139, -431017410, -456036772, -1538350139], '2010-01-21', parse_json('{"jdEMR2jna": "u", "cqXW": -1197314911, "MLH6UrYUS": false, "czddL": 0.2084420739052013, "k": 0.2084420739052013, "C9R": "yH", "gChxtICB6": "CEH"}'), parse_json('{"AUd": 1071653660, "0": true, "fF": [false, "rL", {"L9OmP2F": -663100923, "r": null, "PR": null, "GK1341": 0.2084420739052013, "3": null, "qD": true, "y2": -35680900, "J": 0.35569672561830046}, [null, 0.06071075075301968, 1902661684, "9QyGS", null, 643539105, 0.8600462671536934, ""], {"EIbnprP": 0.3117103376290903}, -1127425070, -1905928473, 0.3117103376290903, false], "hY": false, "E": null, "N8q": {"Sd3eSbQUE": -456036772}, "8": null, "y": "3", "2WgE": [{"IGkGwF9": "NT8Tm", "Vna": null, "BCmhs6": null, "yZP8qPrj": true}, false, null, {"QqfIbCu": null}, "6wvNRKw"], "Ny": {"4": [true, null, 0.42846114775616106, "", 0.010791598206852271, null, null, null], "Gk": -1197314911, "1Cj": null, "J": {"G2OxjcK": true, "EsoR2VA": null, "XaZGqt": -1197314911, "G3N": null, "1W": null, "cY": 1181501455, "OdxF": null, "Nzf": null, "n": null, "o": 0.6935843303958997, "pyw": false}, "ca8o": [1172127963, null, -477684114, false, null, 0.44157444266976664, true, false, null, -1905928473, 1172127963, ""], "IMti": false, "FiP": -1929594281, "V0haJp": true, "QzIQ4": {}}, "rYG0Z0T6d": "E8", "rp0K": [[null, false, -1.538350139E9, null, -1400673281, "lNJ", -431017410, null], 0.14132606367756884, true]}'), true, false, ["", "Y9", "Cac", "oz", "B3P", "When", "", "EU", "QEqvN", "4", "4m"], [-1127425070, -1696000958, -698901695, -456036772, 1776783917, 710745616, -1079668954, 2023661435, 643539105, -1538350139, 9223372036854775807, 1222002726, -1130682294], '2010-01-11 08:00:14', NULL, -1400673281, false, 1181501455, 3194813.5409696603669);
INSERT INTO t0 VALUES ('bytX', 2784521.1, [643539105, -35680900, -81961692, -477684114, -1929594281, -1127425070, -134713984, -467910317, 1172127963, -263275851, 1805580634, 710745616, -467910317], ["mGKwM4Cy", "", "J", "O0", "", "", "9aau0RU9", "a", "HJe6buHy", ""], 13), ('Dt8', 9182482.0, [374981292, 1701998759], ["", "igF", "", "", "bvBxJTp", "F61H", "", "", "Cpypv", "r5yCi0hQ", "6v", "EiMDoCaXa"], 8);
DELETE FROM t1 WHERE c_1_0=0.00065;
INSERT INTO t0 VALUES ('NvrHH', 8094744.8, [1561403491, -1197314911, -1165093911, -2056248636, 382450824, -663100923, -71467730, 1448843780, -1522145302, 1045420677, -492928228, 311157338, 617026131, -742486844], ["X", "", "yyq", "kIUu7H8U", "G", "ZhY", "GF", "", "", "C2THxQObV", "kVtGies", "TJ", "ydU6Dm9R", "9", "MJyv"], 11), ('fz', 8262211.3, [], ["PiBTTyJa", "", "mgWj26K"], 12);
INSERT INTO t0 VALUES ('s', 7922174.1, [-460308043, -1329054779, -14735197, -638172633, -1197314911, -134713984, -1031432564, -1930206642, 1939798333, 2094496463, 335467953, -357638936, 335467953], ["QIN", "lV45n", "R", "g", "oS", "m", "", "GCx", "Z", "2", "Uuni", "D", "", ""], 3);
TRUNCATE TABLE t0;
INSERT INTO t2 VALUES ('rbu', '2010-01-18', 39159, 1013757488, ["IrAo", "", "", "", "Ymf4pZLXc", "cg", "0QwH92X"], 25);
INSERT INTO t1 VALUES (0.00136, '2010-01-01 08:00:14', 0.00074, [-1165093911], '2010-01-14', parse_json('{"qgPpNLL0": null, "b": "Wd", "DYrXhsx3S": 275359466, "HMVW": 0.2084420739052013, "nusW": 0.3397474296001274, "7NUkorFRl": null, "mBCnVghe": null, "ME": 0.41658933650168206, "FmlSv6vFz": true}'), parse_json('{"d": null, "6Fhn03": 0.8393051014862296, "j": null, "MLagp": "k", "XRShO": null}'), false, false, ["", "Yt", "4", "y", "Zm4x", "HzGY", "QU"], [1805580634, 1216667998], '2010-01-21 08:00:14', '', 1004950391, false, -473188910, 8436387.3854160169805), (0.00819, '2010-01-27 08:00:14', 0.00029, [1216667998, 20296865, -1329054779, -1567222021, 1961969736, -1905928473], '2010-01-07', parse_json('{}'), parse_json('{"gYS": {"wL": -1127425070, "2kQ4q": [null, "a", true, false, "qBw", null, true, "8mVOrn6", true], "kDxjYn": {"z": null, "pju9Pi": false}, "3dYaKfP3M": 1198108587, "fLjNEyf": null, "f5qr": "fmwChwYe", "wv": null}, "qA": false, "mR": "0", "6": true}'), NULL, false, ["o", ""], [1902661684, -1930206642, -1430609263, 9223372036854775807, 1172127963, -562085437, 1329059871, 1816458573, -1215009359, 1479569593, 754469150], '2010-01-25 08:00:14', '', 688350187, true, -494030901, 4592350.4724787182742);
INSERT INTO t2 VALUES ('XgG', '2010-01-29', 87576, 588983979, ["", "", "7", ""], 23);
INSERT INTO t0 VALUES ('eYd1K4G', 2466925.5, [-1, -35680900, -726825822, 2023661435, 1842206773, 2094496463], ["", "O", "jTRsOf", "K", "pX", "", "nnP5o0I5", "NytJFi2Q", "IF0", "aDf", "", "kV9oIb", "hNdFuVC", "yB"], 11), ('x', NULL, [-1740628172, -1516957888, -1792092996, -512506484, -913397439, 1449926319, -105888068, 786155642, 1172127963], ["I1C", "d", "", "Z", "", "m", "", "", "", "gS", "q6j", "Uq1N9ZrC", "T"], 3);
INSERT INTO t2 VALUES ('6RvCT', '2010-01-23', 53897, 1936635083, ["KoLMzLNR", "", "", "Faf", "W", "vOr", "CvSgSk9s", "", "j", "", "caTo", "9RVTnZJ"], NULL);
WITH with_t_0 as (SELECT t0_6.c_0_0, t0_6.c_0_1, t0_6.c_0_4 FROM t0 AS t0_6 WHERE true) , with_t_1 as (SELECT t2_8.c_2_0, t2_8.c_2_1, t2_8.c_2_2, t2_8.c_2_3, t2_8.c_2_5 FROM t2 AS t2_8 WHERE CAST(t2_8.c_2_1 AS BOOLEAN ) ORDER BY t2_8.c_2_1) SELECT subt2.c_2_0 FROM t0 AS t0_6, with_t_0 AS with_t_0, with_t_1 AS with_t_1, (SELECT t2_8.c_2_0, t2_8.c_2_1, t2_8.c_2_2, t2_8.c_2_3, t2_8.c_2_5 FROM t2 AS t2_8 ORDER BY t2_8.c_2_2 DESC) subt2 RIGHT JOIN t1 AS t1_7 ON subt2.c_2_2 = t1_7.c_1_7 AND subt2.c_2_2 != ((subt2.c_2_2) IS NOT NULL) WHERE (CAST(WEEKS_DIFF('1969-12-17 19:13:37', '1969-12-21') AS INT ) ) IN ((SELECT subt2.c_2_3 FROM t1 AS t1_7, t0 AS t0_6 RIGHT SEMI JOIN (SELECT t2_8.c_2_0, t2_8.c_2_1, t2_8.c_2_2, t2_8.c_2_3, t2_8.c_2_5 FROM t2 AS t2_8 WHERE ((t2_8.c_2_1) IS NOT NULL)) subt2 ON t0_6.c_0_4 = subt2.c_2_1 AND t0_6.c_0_4 > subt2.c_2_1 AND t0_6.c_0_4 = subt2.c_2_2 AND t0_6.c_0_4 < subt2.c_2_2 WHERE CASE WHEN true THEN NULL_OR_EMPTY('') WHEN (NOT (true)) THEN false ELSE true END) ) ORDER BY t1_7.c_1_2, subt2.c_2_5;
fe.log
java.lang.IllegalStateException: null
at com.google.common.base.Preconditions.checkState(Preconditions.java:494) ~[spark-dpp-1.0.0.jar:?]
at com.starrocks.sql.optimizer.statistics.Statistics.getColumnStatistic(Statistics.java:56) ~[starrocks-fe.jar:?]
at com.starrocks.sql.optimizer.statistics.ExpressionStatisticCalculator$ExpressionStatisticVisitor.visitVariableReference(ExpressionStatisticCalculator.java:63) ~[starrocks-fe.jar:?]
at com.starrocks.sql.optimizer.statistics.ExpressionStatisticCalculator$ExpressionStatisticVisitor.visitVariableReference(ExpressionStatisticCalculator.java:42) ~[starrocks-fe.jar:?]
at com.starrocks.sql.optimizer.operator.scalar.ColumnRefOperator.accept(ColumnRefOperator.java:99) ~[starrocks-fe.jar:?]
at com.starrocks.sql.optimizer.statistics.ExpressionStatisticCalculator.calculate(ExpressionStatisticCalculator.java:39) ~[starrocks-fe.jar:?]
at com.starrocks.sql.optimizer.statistics.ExpressionStatisticCalculator.calculate(ExpressionStatisticCalculator.java:35) ~[starrocks-fe.jar:?]
at com.starrocks.sql.optimizer.statistics.StatisticsCalculator.visitOperator(StatisticsCalculator.java:192) ~[starrocks-fe.jar:?]
at com.starrocks.sql.optimizer.statistics.StatisticsCalculator.computeJoinNode(StatisticsCalculator.java:859) ~[starrocks-fe.jar:?]
at com.starrocks.sql.optimizer.statistics.StatisticsCalculator.visitPhysicalNestLoopJoin(StatisticsCalculator.java:751) ~[starrocks-fe.jar:?]
at com.starrocks.sql.optimizer.statistics.StatisticsCalculator.visitPhysicalNestLoopJoin(StatisticsCalculator.java:137) ~[starrocks-fe.jar:?]
at com.starrocks.sql.optimizer.operator.physical.PhysicalNestLoopJoinOperator.accept(PhysicalNestLoopJoinOperator.java:27) ~[starrocks-fe.jar:?]
at com.starrocks.sql.optimizer.statistics.StatisticsCalculator.estimatorStats(StatisticsCalculator.java:153) ~[starrocks-fe.jar:?]
at com.starrocks.sql.optimizer.task.EnforceAndCostTask.computeCurrentGroupStatistics(EnforceAndCostTask.java:359) ~[starrocks-fe.jar:?]
at com.starrocks.sql.optimizer.task.EnforceAndCostTask.execute(EnforceAndCostTask.java:176) ~[starrocks-fe.jar:?]
at com.starrocks.sql.optimizer.task.SeriallyTaskScheduler.executeTasks(SeriallyTaskScheduler.java:42) ~[starrocks-fe.jar:?]
at com.starrocks.sql.optimizer.Optimizer.memoOptimize(Optimizer.java:167) ~[starrocks-fe.jar:?]
at com.starrocks.sql.optimizer.Optimizer.optimize(Optimizer.java:106) ~[starrocks-fe.jar:?]
at com.starrocks.sql.StatementPlanner.createQueryPlan(StatementPlanner.java:102) ~[starrocks-fe.jar:?]
at com.starrocks.sql.StatementPlanner.plan(StatementPlanner.java:65) ~[starrocks-fe.jar:?]
at com.starrocks.sql.StatementPlanner.plan(StatementPlanner.java:39) ~[starrocks-fe.jar:?]
at com.starrocks.qe.StmtExecutor.execute(StmtExecutor.java:373) ~[starrocks-fe.jar:?]
at com.starrocks.qe.ConnectProcessor.handleQuery(ConnectProcessor.java:322) ~[starrocks-fe.jar:?]
at com.starrocks.qe.ConnectProcessor.dispatch(ConnectProcessor.java:437) ~[starrocks-fe.jar:?]
at com.starrocks.qe.ConnectProcessor.processOnce(ConnectProcessor.java:683) ~[starrocks-fe.jar:?]
at com.starrocks.mysql.nio.ReadListener.lambda$handleEvent$0(ReadListener.java:55) ~[starrocks-fe.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_292]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_292]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_292]
Expected behavior (Required)
Real behavior (Required)
StarRocks version (Required)
You can get the StarRocks version by executing SQL select current_version()
Steps to reproduce the behavior (Required)
fe.log
Expected behavior (Required)
Real behavior (Required)
StarRocks version (Required)
select current_version()