Project: StarRocks (App Definition and Development / Database)
File: Dump_query.md

displayed_sidebar: "English" This topic describes how to use the query_dump interface to obtain the details of an SQL query and its related information. If you encounter any of the following issues when executing SQL queries with StarRocks, you can use query_dump to obtain the SQL details and send the information to StarRocks technical support for troubleshooting: `Unknown Error` is returned when you execute an SQL query or EXPLAIN. An error message or exception is returned when you execute an SQL query. Executing an SQL query is not as efficient as expected, or the execution plan can be optimized (for example, partitions can be pruned or Join order can be adjusted). The query_dump interface returns the information that FE relies on when executing the SQL, including: Query statement Table creation statement Session variables Number of BEs Statistics information (Min, Max values in a column) Exception information (abnormal stack) Explain costs info To ensure data privacy, we desensitize the meta information such as database names, table names, and column names. We also use the desensitized metadata to rewrite the query statements. Meta information desensitization is enabled by default. If an exception occurs during the desensitization process, the original information is used. If desensitization needs to be bypassed, you can add "mock=false" in the HTTP URI. HTTP Post ```shell fehost:fehttpport/api/querydump?db=${database}&mock=${value} post_data=${Query} ``` ```shell wget --user=${username} --password=${password} --post-file ${queryfile} "http://${fehost}:${fehttpport}/api/querydump?db=${database}&mock={value}" -O ${dumpfile} ``` Parameter description: query_file: the file containing the query dump_file: the output file db: the database where the SQL query is executed. The `db` parameter is optional if the query includes `use db`. Otherwise, it must be specified. mock: whether to enable or disable desensitization Command: ```shell wget --user=root --password=123 --post-file queryfile "http://127.0.0.1:8030/api/querydump?db=tpch&mock=false" -O dump_file ``` Return data: Data is returned in JSON format. ```json { "statement": "select\n lreturnflag,\n llinestatus,\n sum(lquantity) as sumqty,\n sum(lextendedprice) as sumbaseprice,\n sum(lextendedprice (1 - l_discount)) as sum_disc_price,\n sum(l_extendedprice (1 - ldiscount) * (1 + ltax)) as sumcharge,\n avg(lquantity) as avgqty,\n avg(lextendedprice) as avgprice,\n avg(ldiscount) as avgdisc,\n count(*) as countorder\nfrom\n lineitem\nwhere\n lshipdate <= date '1998-12-01'\ngroup by\n lreturnflag,\n llinestatus\norder by\n lreturnflag,\n l_linestatus ;\n\n", "table_meta": { "tpch.lineitem": "CREATE TABLE `lineitem` (\n `LORDERKEY` int(11) NOT NULL COMMENT \"\",\n `LPARTKEY` int(11) NOT NULL COMMENT \"\",\n `LSUPPKEY` int(11) NOT NULL COMMENT \"\",\n `LLINENUMBER` int(11) NOT NULL COMMENT \"\",\n `LQUANTITY` double NOT NULL COMMENT \"\",\n `LEXTENDEDPRICE` double NOT NULL COMMENT \"\",\n `LDISCOUNT` double NOT NULL COMMENT \"\",\n `LTAX` double NOT NULL COMMENT \"\",\n `LRETURNFLAG` char(1) NOT NULL COMMENT \"\",\n `LLINESTATUS` char(1) NOT NULL COMMENT \"\",\n `LSHIPDATE` date NOT NULL COMMENT \"\",\n `LCOMMITDATE` date NOT NULL COMMENT \"\",\n `LRECEIPTDATE` date NOT NULL COMMENT \"\",\n `LSHIPINSTRUCT` char(25) NOT NULL COMMENT \"\",\n `LSHIPMODE` char(10) NOT NULL COMMENT \"\",\n `LCOMMENT` varchar(44) NOT NULL COMMENT \"\",\n `PAD` char(1) NOT NULL COMMENT \"\"\n) ENGINE=OLAP \nDUPLICATE KEY(`LORDERKEY`)\nCOMMENT \"OLAP\"\nDISTRIBUTED BY HASH(`LORDERKEY`) BUCKETS 20 \nPROPERTIES (\n\"replicationnum\" = \"1\",\n\"inmemory\" = \"false\",\n\"enablepersistentindex\" = \"false\",\n\"replicated_storage\" = \"true\",\n\"compression\" = \"LZ4\"\n);" }, "tablerowcount": { "tpch.lineitem": { "lineitem": 3 } }, "column_statistics": { "tpch.lineitem": { "L_TAX": "[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE", "L_SHIPDATE": "[1.6094304E9, 1.6094304E9, 0.0, 4.0, 1.0] ESTIMATE", "L_EXTENDEDPRICE": "[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE", "L_DISCOUNT": "[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE", "L_RETURNFLAG": "[-Infinity, Infinity, 0.0, 1.0,

ESTIMATE", "L_LINESTATUS": "[-Infinity, Infinity, 0.0, 1.0, 1.0] ESTIMATE", "L_QUANTITY": "[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE" } }, "explaininfo": "PLAN FRAGMENT 0(F02)\n Output Exprs:9: LRETURNFLAG | 10: LLINESTATUS | 20: sum | 21: sum | 22: sum | 23: sum | 24: avg | 25: avg | 26: avg | 27: count\n Input Partition: UNPARTITIONED\n RESULT SINK\n\n 6:MERGING-EXCHANGE\n distribution type: GATHER\n cardinality: 1\n column statistics: \n * LRETURNFLAG-->[-Infinity, Infinity, 0.0, 1.0, 1.0] ESTIMATE\n L_LINESTATUS-->[-Infinity, Infinity, 0.0, 1.0, 1.0] ESTIMATE\n sum-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n sum-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n sum-->[0.0, 0.0, 0.0, 8.0, 1.0] ESTIMATE\n sum-->[0.0, 0.0, 0.0, 8.0, 1.0] ESTIMATE\n avg-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n avg-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n avg-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n count-->[0.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n\nPLAN FRAGMENT 1(F01)\n\n Input Partition: HASH_PARTITIONED: 9: L_RETURNFLAG, 10: L_LINESTATUS\n OutPut Partition: UNPARTITIONED\n OutPut Exchange Id: 06\n\n 5:SORT\n | order by: [9, VARCHAR, false] ASC, [10, VARCHAR, false] ASC\n | offset: 0\n | cardinality: 1\n | column statistics: \n | LRETURNFLAG-->[-Infinity, Infinity, 0.0, 1.0, 1.0] ESTIMATE\n | * LLINESTATUS-->[-Infinity, Infinity, 0.0, 1.0, 1.0] ESTIMATE\n | sum-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n | sum-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n | sum-->[0.0, 0.0, 0.0, 8.0, 1.0] ESTIMATE\n | sum-->[0.0, 0.0, 0.0, 8.0, 1.0] ESTIMATE\n | avg-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n | avg-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n | avg-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n | count-->[0.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n | \n 4:AGGREGATE (merge finalize)\n | aggregate: sum[([20: sum, DOUBLE, true]); args: DOUBLE; result: DOUBLE; args nullable: true; result nullable: true], sum[([21: sum, DOUBLE, true]); args: DOUBLE; result: DOUBLE; args nullable: true; result nullable: true], sum[([22: sum, DOUBLE, true]); args: DOUBLE; result: DOUBLE; args nullable: true; result nullable: true], sum[([23: sum, DOUBLE, true]); args: DOUBLE; result: DOUBLE; args nullable: true; result nullable: true], avg[([24: avg, VARBINARY, true]); args: DOUBLE; result: DOUBLE; args nullable: true; result nullable: true], avg[([25: avg, VARBINARY, true]); args: DOUBLE; result: DOUBLE; args nullable: true; result nullable: true], avg[([26: avg, VARBINARY, true]); args: DOUBLE; result: DOUBLE; args nullable: true; result nullable: true], count[([27: count, BIGINT, false]); args: ; result: BIGINT; args nullable: true; result nullable: false]\n | group by: [9: LRETURNFLAG, VARCHAR, false], [10: LLINESTATUS, VARCHAR, false]\n | cardinality: 1\n | column statistics: \n | L_RETURNFLAG-->[-Infinity, Infinity, 0.0, 1.0, 1.0] ESTIMATE\n | LLINESTATUS-->[-Infinity, Infinity, 0.0, 1.0, 1.0] ESTIMATE\n | * sum-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n | * sum-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n | * sum-->[0.0, 0.0, 0.0, 8.0, 1.0] ESTIMATE\n | * sum-->[0.0, 0.0, 0.0, 8.0, 1.0] ESTIMATE\n | * avg-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n | * avg-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n | * avg-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n | * count-->[0.0, 1.0, 0.0, 8.0,

ESTIMATE\n | \n 3:EXCHANGE\n distribution type: SHUFFLE\n partition exprs: [9: LRETURNFLAG, VARCHAR, false], [10: LLINESTATUS, VARCHAR, false]\n cardinality: 1\n\nPLAN FRAGMENT 2(F00)\n\n Input Partition: RANDOM\n OutPut Partition: HASHPARTITIONED: 9: LRETURNFLAG, 10: LLINESTATUS\n OutPut Exchange Id: 03\n\n 2:AGGREGATE (update serialize)\n | STREAMING\n | aggregate: sum[([5: LQUANTITY, DOUBLE, false]); args: DOUBLE; result: DOUBLE; args nullable: false; result nullable: true], sum[([6: LEXTENDEDPRICE, DOUBLE, false]); args: DOUBLE; result: DOUBLE; args nullable: false; result nullable: true], sum[([18: expr, DOUBLE, false]); args: DOUBLE; result: DOUBLE; args nullable: false; result nullable: true], sum[([19: expr, DOUBLE, false]); args: DOUBLE; result: DOUBLE; args nullable: false; result nullable: true], avg[([5: LQUANTITY, DOUBLE, false]); args: DOUBLE; result: VARBINARY; args nullable: false; result nullable: true], avg[([6: LEXTENDEDPRICE, DOUBLE, false]); args: DOUBLE; result: VARBINARY; args nullable: false; result nullable: true], avg[([7: LDISCOUNT, DOUBLE, false]); args: DOUBLE; result: VARBINARY; args nullable: false; result nullable: true], count[(*); args: ; result: BIGINT; args nullable: false; result nullable: false]\n | group by: [9: LRETURNFLAG, VARCHAR, false], [10: LLINESTATUS, VARCHAR, false]\n | cardinality: 1\n | column statistics: \n | * LRETURNFLAG-->[-Infinity, Infinity, 0.0, 1.0, 1.0] ESTIMATE\n | L_LINESTATUS-->[-Infinity, Infinity, 0.0, 1.0, 1.0] ESTIMATE\n | sum-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n | sum-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n | sum-->[0.0, 0.0, 0.0, 8.0, 1.0] ESTIMATE\n | sum-->[0.0, 0.0, 0.0, 8.0, 1.0] ESTIMATE\n | avg-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n | avg-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n | avg-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n | count-->[0.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n | \n 1:Project\n | output columns:\n | 5 <-> [5: L_QUANTITY, DOUBLE, false]\n | 6 <-> [6: L_EXTENDEDPRICE, DOUBLE, false]\n | 7 <-> [7: L_DISCOUNT, DOUBLE, false]\n | 9 <-> [9: L_RETURNFLAG, CHAR, false]\n | 10 <-> [10: L_LINESTATUS, CHAR, false]\n | 18 <-> [29: multiply, DOUBLE, false]\n | 19 <-> [29: multiply, DOUBLE, false] 1.0 + [8: LTAX, DOUBLE, false]\n | common expressions:\n | 28 <-> 1.0 - [7: LDISCOUNT, DOUBLE, false]\n | 29 <-> [6: LEXTENDEDPRICE, DOUBLE, false] * [28: subtract, DOUBLE, false]\n | cardinality: 1\n | column statistics: \n | * LQUANTITY-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n | L_EXTENDEDPRICE-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n | LDISCOUNT-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n | * LRETURNFLAG-->[-Infinity, Infinity, 0.0, 1.0, 1.0] ESTIMATE\n | L_LINESTATUS-->[-Infinity, Infinity, 0.0, 1.0, 1.0] ESTIMATE\n | expr-->[0.0, 0.0, 0.0, 8.0, 1.0] ESTIMATE\n | expr-->[0.0, 0.0, 0.0, 8.0, 1.0] ESTIMATE\n | \n 0:OlapScanNode\n table: lineitem, rollup: lineitem\n preAggregation: on\n Predicates: [11: L_SHIPDATE, DATE, false] <= '1998-12-01'\n partitionsRatio=1/1, tabletsRatio=20/20\n tabletList=45030,45032,45034,45036,45038,45040,45042,45044,45046,45048 ...\n actualRows=3, avgRowSize=54.0\n cardinality: 1\n column statistics: \n LQUANTITY-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n * LEXTENDEDPRICE-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n L_DISCOUNT-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n LTAX-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n * LRETURNFLAG-->[-Infinity, Infinity, 0.0, 1.0, 1.0] ESTIMATE\n L_LINESTATUS-->[-Infinity, Infinity, 0.0, 1.0, 1.0] ESTIMATE\n L_SHIPDATE-->[NaN, NaN, 0.0, 4.0, 1.0] ESTIMATE\n expr-->[0.0, 0.0, 0.0, 8.0, 1.0] ESTIMATE\n expr-->[0.0, 0.0, 0.0, 8.0, 1.0] ESTIMATE\n", "sessionvariables": "{\"partialupdatemode\":\"auto\",\"cboctereuse\":true,\"charactersetconnection\":\"utf8\",\"cbousecorrelatedjoinestimate\":true,\"enableinsertstrict\":true,\"enableconnectoradaptiveiotasks\":true,\"txisolation\":\"REPEATABLE-READ\",\"enablehivemetadatacachewithinsert\":false,\"cboctereuseratev2\":1.15,\"charactersetresults\":\"utf8\",\"enablecountstaroptimization\":true,\"queryexcludingmvnames\":\"\",\"enablerewritesimpleaggtometascan\":false,\"enableadaptivesinkdop\":true,\"consistenthashvirtualnumber\":32,\"enableprofile\":false,\"loadmemlimit\":0,\"sqlsafeupdates\":0,\"runtimefilterearlyreturnselectivity\":0.05,\"enablelocalshuffleagg\":true,\"disablefunctionfoldconstants\":false,\"selectratiothreshold\":0.15,\"querydeliverytimeout\":300,\"collationdatabase\":\"utf8generalci\",\"spillmemtablesize\":104857600,\"cbouselockdb\":false,\"newplanneraggstage\":0,\"usecomputenodes\":-1,\"collationconnection\":\"utf8generalci\",\"resourcegroup\":\"\",\"profilelimitfold\":true,\"spilloperatormaxbytes\":1048576000,\"cbomaxreordernodeusedp\":10,\"enablehivecolumnstats\":true,\"enablegroupbyuseoutputalias\":false,\"forwardtoleader\":false,\"countdistinctcolumnbuckets\":1024,\"querycacheaggcardinalitylimit\":5000000,\"cboPushDownAggregateModev1\":-1,\"windowpartitionmode\":1,\"enabletabletinternalparallelv2\":true,\"interpolatepassthrough\":true,\"enableincrementalmv\":false,\"SQLAUTOISNULL\":false,\"eventscheduler\":\"OFF\",\"maxpipelinedop\":64,\"broadcastrighttablescalefactor\":10,\"materializedviewrewritemode\":\"DEFAULT\",\"enablesimplifycasewhen\":true,\"runtimejoinfilterpushdownlimit\":1024000,\"bigquerylogcpusecondthreshold\":480,\"divprecisionincrement\":4,\"runtimeadaptivedopmaxblockrowsperdriverseq\":16384,\"logrejectedrecordnum\":0,\"cbopushdowndistinctbelowwindow\":true,\"sqlmodev2\":32,\"prefercterewrite\":false,\"hdfsbackendselectorscanrangeshuffle\":false,\"pipelineprofilelevel\":1,\"parallelfragmentexecinstancenum\":1,\"maxscankeynum\":-1,\"netreadtimeout\":60,\"streamingpreaggregationmode\":\"auto\",\"hivepartitionstatssamplesize\":3000,\"enablemvplanner\":false,\"enablecollecttablelevelscanstats\":true,\"profiletimeout\":2,\"cbopushdownaggregate\":\"global\",\"spillencodelevel\":7,\"enablequerydump\":false,\"globalruntimefilterbuildmaxsize\":67108864,\"enablerewritesumbyassociativerule\":true,\"querycachehotpartitionnum\":3,\"enableprunecomplextypes\":true,\"querycachetype\":0,\"maxparallelscaninstancenum\":-1,\"querycacheentrymaxrows\":409600,\"enablemvoptimizertracelog\":false,\"connectoriotasksperscanoperator\":16,\"enablematerializedviewunionrewrite\":true,\"sqlquoteshowcreate\":true,\"scanortounionthreshold\":50000000,\"enableexchangepassthrough\":true,\"runtimeprofilereportinterval\":10,\"querycacheentrymaxbytes\":4194304,\"enableexchangeperf\":false,\"workgroupid\":0,\"enablerewritegroupingsetstounionall\":false,\"transmissioncompressiontype\":\"NOCOMPRESSION\",\"interactivetimeout\":3600,\"usepagecache\":true,\"bigquerylogscanbytesthreshold\":10737418240,\"collationserver\":\"utf8generalci\",\"tabletinternalparallelmode\":\"auto\",\"enablepipeline\":true,\"spillmode\":\"auto\",\"enablequerydebugtrace\":false,\"enableshowallvariables\":false,\"fullsortmaxbufferedbytes\":16777216,\"waittimeout\":28800,\"transmissionencodelevel\":7,\"queryincludingmvnames\":\"\",\"transactionisolation\":\"REPEATABLE-READ\",\"enableglobalruntimefilter\":true,\"enableloadprofile\":false,\"enableplanvalidation\":true,\"loadtransmissioncompressiontype\":\"NOCOMPRESSION\",\"cboenablelowcardinalityoptimize\":true,\"scanusequerymemratio\":0.3,\"newplanneroptimizetimeout\":3000,\"enableouterjoinreorder\":true,\"forceschedulelocal\":false,\"hudimorforcejnireader\":false,\"cboenablegreedyjoinreorder\":true,\"rangeprunermaxpredicate\":100,\"enablerbotableprune\":false,\"spillableoperatormask\":-1,\"rpchttpminsize\":2147482624,\"cbodebugalivebackendnumber\":0,\"globalruntimefilterprobeminsize\":102400,\"scanortounionlimit\":4,\"enablecbotableprune\":false,\"enableparallelmerge\":true,\"nestedmvrewritemaxlevel\":3,\"netwritetimeout\":60,\"cbopruneshufflecolumnrate\":0.1,\"spillrevocablemaxbytes\":0,\"hashjoinpushdownrighttable\":true,\"pipelinesinkdop\":0,\"broadcastrowlimit\":15000000,\"enablepopulateblockcache\":true,\"execmemlimit\":2147483648,\"enablesortaggregate\":false,\"querycacheforcepopulate\":false,\"runtimefilteronexchangenode\":false,\"disablejoinreorder\":false,\"enablerulebasedmaterializedviewrewrite\":true,\"connectorscanusequerymemratio\":0.3,\"netbufferlength\":16384,\"cboprunesubfield\":true,\"fullsortmaxbufferedrows\":1024000,\"querytimeout\":300,\"connectoriotasksslowiolatencyms\":50,\"cbomaxreordernode\":50,\"enabledistinctcolumnbucketization\":false,\"enablebigquerylog\":true,\"analyzemv\":\"sample\",\"runtimefilterscanwaittime\":20,\"enablesyncmaterializedviewrewrite\":true,\"prefercomputenode\":false,\"enablestricttype\":false,\"groupconcatmaxlen\":65535,\"parsetokenslimit\":3500000,\"chunksize\":4096,\"globalruntimefilterprobeminselectivity\":0.5,\"querymemlimit\":0,\"enablefilterunusedcolumnsinscanstage\":true,\"enablescanblockcache\":false,\"enablematerializedviewsingletableviewdeltarewrite\":false,\"autoincrementincrement\":1,\"sqldialect\":\"StarRocks\",\"bigquerylogscanrowsthreshold\":1000000000,\"charactersetclient\":\"utf8\",\"autocommit\":true,\"enablecolumnexprpredicate\":true,\"enableruntimeadaptivedop\":false,\"cboctemaxlimit\":10,\"storageengine\":\"olap\",\"enableoptimizertracelog\":false,\"spilloperatorminbytes\":52428800,\"cboenabledpjoinreorder\":true,\"txvisiblewaittimeout\":10,\"enablematerializedviewviewdeltarewrite\":true,\"cbomaxreordernodeuseexhaustive\":4,\"enablesqldigest\":false,\"spillmemtablenum\":2,\"enablespill\":false,\"pipelinedop\":0,\"singlenodeexecplan\":false,\"fullsortlatematerializationv2\":true,\"joinimplementationmodev2\":\"auto\",\"sqlselectlimit\":9223372036854775807,\"enablematerializedviewrewrite\":true,\"statisticcollectparallel\":1,\"hdfsbackendselectorhashalgorithm\":\"consistent\",\"disablecolocatejoin\":false,\"maxpushdownconditionspercolumn\":-1,\"defaulttablecompression\":\"lz4frame\",\"runtimeadaptivedopmaxoutputamplificationfactor\":0,\"innodbreadonly\":true,\"spillmemlimitthreshold\":0.8,\"cboreorderthresholduseexhaustive\":6,\"enablepredicatereorder\":false,\"enablequerycache\":false,\"maxallowedpacket\":33554432,\"timezone\":\"Asia/Shanghai\",\"enablemulticolumnglobalruntimefilter\":false,\"charactersetserver\":\"utf8\",\"cbousenthexecplan\":0,\"iotasksperscanoperator\":4,\"parallelexchangeinstancenum\":-1,\"enablesharedscan\":false,\"allowdefault_partition\":false}", "be_number": 1, "becorestat": { "numOfHardwareCoresPerBe": "{\"10004\":104}", "cachedAvgNumOfHardwareCores": 104 }, "exception": [], "version": "main_querydump", "commit_version": "0c4d8c8d3e" } ``` Command: ```shell wget --user=root --password=123 --post-file queryfile "http://127.0.0.1:8030/api/querydump?db=tpch -O dump_file ``` Return data: The desensitized data is returned in JSON format. ```json { "statement": "SELECT tblmock001.mock012, tblmock001.mock007, sum(tblmock001.mock010) AS mock019, sum(tblmock001.mock005) AS mock020, sum(tblmock001.mock005 * (1 - tblmock001.mock004)) AS mock021, sum((tblmock001.mock005 (1 - tbl_mock_001.mock_004)) (1 + tblmock001.mock017)) AS mock022, avg(tblmock001.mock010) AS mock023, avg(tblmock001.mock005) AS mock024, avg(tblmock001.mock004) AS mock025, count(*) AS mock026\nFROM dbmock000.tblmock001\nWHERE tblmock001.mock013 <= '1998-12-01'\nGROUP BY tblmock001.mock012, tblmock001.mock007 ORDER BY tblmock001.mock012 ASC, tblmock001.mock007 ASC ", "table_meta": { "dbmock000.tblmock001": "CREATE TABLE

(\nmock008 int(11) NOT NULL ,\nmock009 int(11) NOT NULL ,\nmock016 int(11) NOT NULL ,\nmock006 int(11) NOT NULL ,\nmock010 double NOT NULL ,\nmock005 double NOT NULL ,\nmock004 double NOT NULL ,\nmock017 double NOT NULL ,\nmock012 char(1) NOT NULL ,\nmock007 char(1) NOT NULL ,\nmock013 date NOT NULL ,\nmock003 date NOT NULL ,\nmock011 date NOT NULL ,\nmock014 char(25) NOT NULL ,\nmock015 char(10) NOT NULL ,\nmock002 varchar(44) NOT NULL ,\nmock018 char(1) NOT NULL \n) ENGINE= OLAP \nDUPLICATE KEY(mock008)\nDISTRIBUTED BY HASH(mock008) BUCKETS 20 \nPROPERTIES (\n\"replicationnum\" = \"1\"\n);" }, "tablerowcount": { "dbmock000.tblmock001": { "tblmock001": 3 } }, "column_statistics": { "dbmock000.tblmock001": { "mock_017": "[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE", "mock_013": "[1.6094304E9, 1.6094304E9, 0.0, 4.0, 1.0] ESTIMATE", "mock_005": "[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE", "mock_004": "[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE", "mock_012": "[-Infinity, Infinity, 0.0, 1.0, 1.0] ESTIMATE", "mock_007": "[-Infinity, Infinity, 0.0, 1.0, 1.0] ESTIMATE", "mock_010": "[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE" } }, "explaininfo": "PLAN FRAGMENT 0(F02)\n Output Exprs:9: mock012 | 10: mock007 | 20: sum | 21: sum | 22: sum | 23: sum | 24: avg | 25: avg | 26: avg | 27: count\n Input Partition: UNPARTITIONED\n RESULT SINK\n\n 6:MERGING-EXCHANGE\n distribution type: GATHER\n cardinality: 1\n column statistics: \n * mock012-->[-Infinity, Infinity, 0.0, 1.0, 1.0] ESTIMATE\n mock_007-->[-Infinity, Infinity, 0.0, 1.0, 1.0] ESTIMATE\n sum-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n sum-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n sum-->[0.0, 0.0, 0.0, 8.0, 1.0] ESTIMATE\n sum-->[0.0, 0.0, 0.0, 8.0, 1.0] ESTIMATE\n avg-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n avg-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n avg-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n count-->[0.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n\nPLAN FRAGMENT 1(F01)\n\n Input Partition: HASH_PARTITIONED: 9: mock_012, 10: mock_007\n OutPut Partition: UNPARTITIONED\n OutPut Exchange id: 06\n\n 5:SORT\n | order by: [9, VARCHAR, false] ASC, [10, VARCHAR, false] ASC\n | offset: 0\n | cardinality: 1\n | column statistics: \n | mock012-->[-Infinity, Infinity, 0.0, 1.0, 1.0] ESTIMATE\n | * mock007-->[-Infinity, Infinity, 0.0, 1.0, 1.0] ESTIMATE\n | sum-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n | sum-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n | sum-->[0.0, 0.0, 0.0, 8.0, 1.0] ESTIMATE\n | sum-->[0.0, 0.0, 0.0, 8.0, 1.0] ESTIMATE\n | avg-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n | avg-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n | avg-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n | count-->[0.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n | \n 4:AGGREGATE (merge finalize)\n | aggregate: sum[([20: sum, DOUBLE, true]); args: DOUBLE; result: DOUBLE; args nullable: true; result nullable: true], sum[([21: sum, DOUBLE, true]); args: DOUBLE; result: DOUBLE; args nullable: true; result nullable: true], sum[([22: sum, DOUBLE, true]); args: DOUBLE; result: DOUBLE; args nullable: true; result nullable: true], sum[([23: sum, DOUBLE, true]); args: DOUBLE; result: DOUBLE; args nullable: true; result nullable: true], avg[([24: avg, VARBINARY, true]); args: DOUBLE; result: DOUBLE; args nullable: true; result nullable: true], avg[([25: avg, VARBINARY, true]); args: DOUBLE; result: DOUBLE; args nullable: true; result nullable: true], avg[([26: avg, VARBINARY, true]); args: DOUBLE; result: DOUBLE; args nullable: true; result nullable: true], count[([27: count, BIGINT, false]); args: ; result: BIGINT; args nullable: true; result nullable: false]\n | group by: [9: mock012, VARCHAR, false], [10: mock007, VARCHAR, false]\n | cardinality: 1\n | column statistics: \n | mock_012-->[-Infinity, Infinity, 0.0, 1.0, 1.0] ESTIMATE\n | mock007-->[-Infinity, Infinity, 0.0, 1.0, 1.0] ESTIMATE\n | * sum-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n | * sum-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n | * sum-->[0.0, 0.0, 0.0, 8.0, 1.0] ESTIMATE\n | * sum-->[0.0,

0.0, 8.0, 1.0] ESTIMATE\n | * avg-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n | * avg-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n | * avg-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n | * count-->[0.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n | \n 3:EXCHANGE\n distribution type: SHUFFLE\n partition exprs: [9: mock012, VARCHAR, false], [10: mock007, VARCHAR, false]\n cardinality: 1\n\nPLAN FRAGMENT 2(F00)\n\n Input Partition: RANDOM\n OutPut Partition: HASHPARTITIONED: 9: mock012, 10: mock007\n OutPut Exchange id: 03\n\n 2:AGGREGATE (update serialize)\n | STREAMING\n | aggregate: sum[([5: mock010, DOUBLE, false]); args: DOUBLE; result: DOUBLE; args nullable: false; result nullable: true], sum[([6: mock005, DOUBLE, false]); args: DOUBLE; result: DOUBLE; args nullable: false; result nullable: true], sum[([18: expr, DOUBLE, false]); args: DOUBLE; result: DOUBLE; args nullable: false; result nullable: true], sum[([19: expr, DOUBLE, false]); args: DOUBLE; result: DOUBLE; args nullable: false; result nullable: true], avg[([5: mock010, DOUBLE, false]); args: DOUBLE; result: VARBINARY; args nullable: false; result nullable: true], avg[([6: mock005, DOUBLE, false]); args: DOUBLE; result: VARBINARY; args nullable: false; result nullable: true], avg[([7: mock004, DOUBLE, false]); args: DOUBLE; result: VARBINARY; args nullable: false; result nullable: true], count[(*); args: ; result: BIGINT; args nullable: false; result nullable: false]\n | group by: [9: mock012, VARCHAR, false], [10: mock007, VARCHAR, false]\n | cardinality: 1\n | column statistics: \n | * mock012-->[-Infinity, Infinity, 0.0, 1.0, 1.0] ESTIMATE\n | mock_007-->[-Infinity, Infinity, 0.0, 1.0, 1.0] ESTIMATE\n | sum-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n | sum-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n | sum-->[0.0, 0.0, 0.0, 8.0, 1.0] ESTIMATE\n | sum-->[0.0, 0.0, 0.0, 8.0, 1.0] ESTIMATE\n | avg-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n | avg-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n | avg-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n | count-->[0.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n | \n 1:Project\n | output columns:\n | 5 <-> [5: mock_010, DOUBLE, false]\n | 6 <-> [6: mock_005, DOUBLE, false]\n | 7 <-> [7: mock_004, DOUBLE, false]\n | 9 <-> [9: mock_012, CHAR, false]\n | 10 <-> [10: mock_007, CHAR, false]\n | 18 <-> [29: multiply, DOUBLE, false]\n | 19 <-> [29: multiply, DOUBLE, false] 1.0 + [8: mock017, DOUBLE, false]\n | common expressions:\n | 28 <-> 1.0 - [7: mock004, DOUBLE, false]\n | 29 <-> [6: mock005, DOUBLE, false] * [28: subtract, DOUBLE, false]\n | cardinality: 1\n | column statistics: \n | * mock010-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n | mock_005-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n | mock004-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n | * mock012-->[-Infinity, Infinity, 0.0, 1.0, 1.0] ESTIMATE\n | mock_007-->[-Infinity, Infinity, 0.0, 1.0, 1.0] ESTIMATE\n | expr-->[0.0, 0.0, 0.0, 8.0, 1.0] ESTIMATE\n | expr-->[0.0, 0.0, 0.0, 8.0, 1.0] ESTIMATE\n | \n 0:OlapScanNode\n table: mock_001, rollup: mock_001\n preAggregation: on\n Predicates: [11: mock_013, DATE, false] <= '1998-12-01'\n partitionsRatio=1/1, tabletsRatio=20/20\n tabletList=45030,45032,45034,45036,45038,45040,45042,45044,45046,45048 ...\n actualRows=3, avgRowSize=54.0\n cardinality: 1\n column statistics: \n mock010-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n * mock005-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n mock_004-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n mock017-->[1.0, 1.0, 0.0, 8.0, 1.0] ESTIMATE\n * mock012-->[-Infinity, Infinity, 0.0, 1.0, 1.0] ESTIMATE\n mock_007-->[-Infinity, Infinity, 0.0, 1.0, 1.0] ESTIMATE\n mock_013-->[NaN, NaN, 0.0, 4.0, 1.0] ESTIMATE\n expr-->[0.0, 0.0, 0.0, 8.0, 1.0] ESTIMATE\n expr-->[0.0, 0.0, 0.0, 8.0, 1.0] ESTIMATE\n", "sessionvariables": "{\"partialupdatemode\":\"auto\",\"cboctereuse\":true,\"charactersetconnection\":\"utf8\",\"cbousecorrelatedjoinestimate\":true,\"enableinsertstrict\":true,\"enableconnectoradaptiveiotasks\":true,\"txisolation\":\"REPEATABLE-READ\",\"enablehivemetadatacachewithinsert\":false,\"cboctereuseratev2\":1.15,\"charactersetresults\":\"utf8\",\"enablecountstaroptimization\":true,\"queryexcludingmvnames\":\"\",\"enablerewritesimpleaggtometascan\":false,\"enableadaptivesinkdop\":true,\"consistenthashvirtualnumber\":32,\"enableprofile\":false,\"loadmemlimit\":0,\"sqlsafeupdates\":0,\"runtimefilterearlyreturnselectivity\":0.05,\"enablelocalshuffleagg\":true,\"disablefunctionfoldconstants\":false,\"selectratiothreshold\":0.15,\"querydeliverytimeout\":300,\"collationdatabase\":\"utf8generalci\",\"spillmemtablesize\":104857600,\"cbouselockdb\":false,\"newplanneraggstage\":0,\"usecomputenodes\":-1,\"collationconnection\":\"utf8generalci\",\"resourcegroup\":\"\",\"profilelimitfold\":true,\"spilloperatormaxbytes\":1048576000,\"cbomaxreordernodeusedp\":10,\"enablehivecolumnstats\":true,\"enablegroupbyuseoutputalias\":false,\"forwardtoleader\":false,\"countdistinctcolumnbuckets\":1024,\"querycacheaggcardinalitylimit\":5000000,\"cboPushDownAggregateModev1\":-1,\"windowpartitionmode\":1,\"enabletabletinternalparallelv2\":true,\"interpolatepassthrough\":true,\"enableincrementalmv\":false,\"SQLAUTOISNULL\":false,\"eventscheduler\":\"OFF\",\"maxpipelinedop\":64,\"broadcastrighttablescalefactor\":10,\"materializedviewrewritemode\":\"DEFAULT\",\"enablesimplifycasewhen\":true,\"runtimejoinfilterpushdownlimit\":1024000,\"bigquerylogcpusecondthreshold\":480,\"divprecisionincrement\":4,\"runtimeadaptivedopmaxblockrowsperdriverseq\":16384,\"logrejectedrecordnum\":0,\"cbopushdowndistinctbelowwindow\":true,\"sqlmodev2\":32,\"prefercterewrite\":false,\"hdfsbackendselectorscanrangeshuffle\":false,\"pipelineprofilelevel\":1,\"parallelfragmentexecinstancenum\":1,\"maxscankeynum\":-1,\"netreadtimeout\":60,\"streamingpreaggregationmode\":\"auto\",\"hivepartitionstatssamplesize\":3000,\"enablemvplanner\":false,\"enablecollecttablelevelscanstats\":true,\"profiletimeout\":2,\"cbopushdownaggregate\":\"global\",\"spillencodelevel\":7,\"enablequerydump\":false,\"globalruntimefilterbuildmaxsize\":67108864,\"enablerewritesumbyassociativerule\":true,\"querycachehotpartitionnum\":3,\"enableprunecomplextypes\":true,\"querycachetype\":0,\"maxparallelscaninstancenum\":-1,\"querycacheentrymaxrows\":409600,\"enablemvoptimizertracelog\":false,\"connectoriotasksperscanoperator\":16,\"enablematerializedviewunionrewrite\":true,\"sqlquoteshowcreate\":true,\"scanortounionthreshold\":50000000,\"enableexchangepassthrough\":true,\"runtimeprofilereportinterval\":10,\"querycacheentrymaxbytes\":4194304,\"enableexchangeperf\":false,\"workgroupid\":0,\"enablerewritegroupingsetstounionall\":false,\"transmissioncompressiontype\":\"NOCOMPRESSION\",\"interactivetimeout\":3600,\"usepagecache\":true,\"bigquerylogscanbytesthreshold\":10737418240,\"collationserver\":\"utf8generalci\",\"tabletinternalparallelmode\":\"auto\",\"enablepipeline\":true,\"spillmode\":\"auto\",\"enablequerydebugtrace\":false,\"enableshowallvariables\":false,\"fullsortmaxbufferedbytes\":16777216,\"waittimeout\":28800,\"transmissionencodelevel\":7,\"queryincludingmvnames\":\"\",\"transactionisolation\":\"REPEATABLE-READ\",\"enableglobalruntimefilter\":true,\"enableloadprofile\":false,\"enableplanvalidation\":true,\"loadtransmissioncompressiontype\":\"NOCOMPRESSION\",\"cboenablelowcardinalityoptimize\":true,\"scanusequerymemratio\":0.3,\"newplanneroptimizetimeout\":3000,\"enableouterjoinreorder\":true,\"forceschedulelocal\":false,\"hudimorforcejnireader\":false,\"cboenablegreedyjoinreorder\":true,\"rangeprunermaxpredicate\":100,\"enablerbotableprune\":false,\"spillableoperatormask\":-1,\"rpchttpminsize\":2147482624,\"cbodebugalivebackendnumber\":0,\"globalruntimefilterprobeminsize\":102400,\"scanortounionlimit\":4,\"enablecbotableprune\":false,\"enableparallelmerge\":true,\"nestedmvrewritemaxlevel\":3,\"netwritetimeout\":60,\"cbopruneshufflecolumnrate\":0.1,\"spillrevocablemaxbytes\":0,\"hashjoinpushdownrighttable\":true,\"pipelinesinkdop\":0,\"broadcastrowlimit\":15000000,\"enablepopulateblockcache\":true,\"execmemlimit\":2147483648,\"enablesortaggregate\":false,\"querycacheforcepopulate\":false,\"runtimefilteronexchangenode\":false,\"disablejoinreorder\":false,\"enablerulebasedmaterializedviewrewrite\":true,\"connectorscanusequerymemratio\":0.3,\"netbufferlength\":16384,\"cboprunesubfield\":true,\"fullsortmaxbufferedrows\":1024000,\"querytimeout\":300,\"connectoriotasksslowiolatencyms\":50,\"cbomaxreordernode\":50,\"enabledistinctcolumnbucketization\":false,\"enablebigquerylog\":true,\"analyzemv\":\"sample\",\"runtimefilterscanwaittime\":20,\"enablesyncmaterializedviewrewrite\":true,\"prefercomputenode\":false,\"enablestricttype\":false,\"groupconcatmaxlen\":65535,\"parsetokenslimit\":3500000,\"chunksize\":4096,\"globalruntimefilterprobeminselectivity\":0.5,\"querymemlimit\":0,\"enablefilterunusedcolumnsinscanstage\":true,\"enablescanblockcache\":false,\"enablematerializedviewsingletableviewdeltarewrite\":false,\"autoincrementincrement\":1,\"sqldialect\":\"StarRocks\",\"bigquerylogscanrowsthreshold\":1000000000,\"charactersetclient\":\"utf8\",\"autocommit\":true,\"enablecolumnexprpredicate\":true,\"enableruntimeadaptivedop\":false,\"cboctemaxlimit\":10,\"storageengine\":\"olap\",\"enableoptimizertracelog\":false,\"spilloperatorminbytes\":52428800,\"cboenabledpjoinreorder\":true,\"txvisiblewaittimeout\":10,\"enablematerializedviewviewdeltarewrite\":true,\"cbomaxreordernodeuseexhaustive\":4,\"enablesqldigest\":false,\"spillmemtablenum\":2,\"enablespill\":false,\"pipelinedop\":0,\"singlenodeexecplan\":false,\"fullsortlatematerializationv2\":true,\"joinimplementationmodev2\":\"auto\",\"sqlselectlimit\":9223372036854775807,\"enablematerializedviewrewrite\":true,\"statisticcollectparallel\":1,\"hdfsbackendselectorhashalgorithm\":\"consistent\",\"disablecolocatejoin\":false,\"maxpushdownconditionspercolumn\":-1,\"defaulttablecompression\":\"lz4frame\",\"runtimeadaptivedopmaxoutputamplificationfactor\":0,\"innodbreadonly\":true,\"spillmemlimitthreshold\":0.8,\"cboreorderthresholduseexhaustive\":6,\"enablepredicatereorder\":false,\"enablequerycache\":false,\"maxallowedpacket\":33554432,\"timezone\":\"Asia/Shanghai\",\"enablemulticolumnglobalruntimefilter\":false,\"charactersetserver\":\"utf8\",\"cbousenthexecplan\":0,\"iotasksperscanoperator\":4,\"parallelexchangeinstancenum\":-1,\"enablesharedscan\":false,\"allowdefault_partition\":false}", "be_number": 1, "becorestat": { "numOfHardwareCoresPerBe": "{\"10004\":104}", "cachedAvgNumOfHardwareCores": 104 }, "exception": [], "version": "main_querydump", "commit_version": "0c4d8c8d3e" } ```