repository stringclasses 156 values | issue title stringlengths 1 1.01k ⌀ | labels stringclasses 8 values | body stringlengths 1 270k ⌀ |
|---|---|---|---|
prestodbpresto | query profiler | Enhancement | the purpose of the query profiler be to provide a tool to find bottleneck in the execution of query a graphical representation be well suited to show how the datum flow across operator and where execution be either block or slow the current coordinator ui provide detail about the execution of a query it be however hard to embed in an external application within the scope of the query profiler we include the ability to embed javascript component in an external web application and the availability of endpoint to get the necessary datum of the annotated query plan and its execution to enable a posteriori analysis the query profiler would also persistent the datum now the live plan only work when a query be run or when it finish and be not clean up |
prestodbpresto | fail runtime assertion driver should never block | Bug | java lang illegalstateexception driver should never block at com google common base precondition checkstate precondition java 504 at com facebook presto operator index indexloader indexsnapshotloader load indexloader java 337 at com facebook presto operator index indexloader getindexeddataforkey indexloader java 180 at com facebook presto operator index indexloader getindexeddataforkey indexloader java 158 at com facebook presto operator index indexlookupsource getjoinposition indexlookupsource java 83 at com facebook presto operator index indexlookupsource getjoinposition indexlookupsource java 74 at com facebook presto operator joinprobe getcurrentjoinposition joinprobe java 87 at com facebook presto operator lookupjoinoperator advanceprobeposition lookupjoinoperator java 565 at com facebook presto operator lookupjoinoperator processprobe lookupjoinoperator java 478 at com facebook presto operator lookupjoinoperator lambda processprobe 3 lookupjoinoperator java 399 at com facebook presto operator staticlookupsourceprovider withlease staticlookupsourceprovider java 34 at com facebook presto operator lookupjoinoperator processprobe lookupjoinoperator java 396 at com facebook presto operator lookupjoinoperator getoutput lookupjoinoperator java 311 at com facebook presto operator driver processinternal driver java 379 at com facebook presto operator driver lambda processfor 8 driver java 283 at com facebook presto operator driver trywithlock driver java 675 at com facebook presto operator driver processfor driver java 276 at com facebook presto execution sqltaskexecution driversplitrunner processfor sqltaskexecution java 1077 at com facebook presto execution executor prioritizedsplitrunner process prioritizedsplitrunner java 162 at com facebook presto execution executor taskexecutor taskrunner run taskexecutor java 483 at com facebook presto gen presto 0 219 20190514 204259 1 run unknown source at java base java util concurrent threadpoolexecutor runworker threadpoolexecutor java 1135 at java base java util concurrent threadpoolexecutor worker run threadpoolexecutor java 635 at java base java lang thread run thread java 844 |
prestodbpresto | new udf proposal support row projection | Enhancement | we propose a mechanism to project a row with schema t to another row with schema u where u contain a subset of the attribute of t this must also support nest row array of row and map with row as value we propose add this as a udf however this could also be a feature of cast wherein one can cast from a row to a sub row some example as a udf would look like project row cast row 1 row 2 3 4 as row a int b row c int d int e int row b row d int e int row row 3 4 project row cast row array row 1 2 row 3 4 5 as row a array d int row a array row array row 1 row 3 both of these can be accomplish with standard sql feature but the query be verbose and difficult to maintain a projection api for row would be valuable |
prestodbpresto | verifier fail handle float point column with sum close to 0 | Bug | in one of the production query a column mismatch on a float point column f where sum f 0 on the production cluster while sum f 1e 12 on the test cluster the datum contain positive value and their negate which should exactly cancel each other and the discrepancy result from the order of execution of sum aggregation it look like we attempt to handle those case in which on the control and test sum be exactly 0 and thus relative error be meaningless but the absolute margin we tolerate be basically 0 l148 l154 solution we need to introduce some sort of absolute error margin so that we allow verification to pass when difference absolute error margin in addition we might want to add a checksum column for float point column to double check those case sum abs f |
prestodbpresto | sort checksum for array column cause checksum query to fail in verifier | Bug | follow up on cc mayankgarg1990 mbasmanova cause the failure occur when we sort an orderable array column checksum array sort array column in order to disregard the ordering when verify the column in sql spec null be generally treat as unknown for example in presto select row 1 null row 2 null be true because the order can be determine at position 0 but select row 1 null row 1 null throw because null comparison happen at position 1 in the checksum query the array column can be an array row with some of the row contain null element cause array sort to throw what column be impact array column with element type array or row array column with element type map and with array or row nest in the key type or the value type solution 1 cast the column to array json before sort checksum array sort cast array column as array json solution 2 only cast to array json as a fallback coalesce checksum array sort array column checksum array sort cast array column as array json other thought |
prestodbpresto | limit incorrectly push down for full outer join | Bug | incorrectly push a limit through a full outer join you can t push down the limit because you will end up lose match and output null example select from value 1 2 3 as a i d full outer join value 2 3 1 as b i d on a i d b i d limit 1 |
prestodbpresto | support row comparison for field with null element | Bug | the issue be manifest when we re call checksum on row type column and some row contain null element to reproduce sql select array sort array agg row x y from value null null 1 2 as t x y stacktrace com facebook presto spi prestoexception row comparison not support for field with null element at com facebook presto spi type rowtype checkelementnotnull rowtype java 269 at com facebook presto spi type rowtype compareto rowtype java 240 at com facebook presto operator scalar arraysortfunction 1 compare arraysortfunction java 83 at com facebook presto operator scalar arraysortfunction 1 compare arraysortfunction java 66 at java base java util timsort countrunandmakeascende timsort java 355 at java base java util timsort sort timsort java 220 at java base java util array sort array java 1440 at java base java util list sort list java 506 at java base java util collection sort collection java 176 at com facebook presto operator scalar arraysortfunction sort arraysortfunction java 65 at com facebook presto gen pageprojectionwork 20190416 225748 08059 xkma5 0 7 570478 evaluate unknown source at com facebook presto gen pageprojectionwork 20190416 225748 08059 xkma5 0 7 570478 process unknown source at com facebook presto operator project dictionaryawarepageprojection dictionaryawarepageprojectionwork process dictionaryawarepageprojection java 175 at com facebook presto operator project pageprocessor projectselectedposition processbatch pageprocessor java 295 at com facebook presto operator project pageprocessor projectselectedposition process pageprocessor java 183 at com facebook presto operator workprocessorutil processworkprocessor process workprocessorutil java 315 at com facebook presto operator workprocessorutil yieldingiterator computenext workprocessorutil java 79 at com facebook presto operator workprocessorutil yieldingiterator computenext workprocessorutil java 65 at com google common collect abstractiterator trytocomputenext abstractiterator java 141 at com google common collect abstractiterator hasnext abstractiterator java 136 at com facebook presto operator project mergingpageoutput getoutput mergingpageoutput java 111 at com facebook presto operator filterandprojectoperator getoutput filterandprojectoperator java 102 at com facebook presto operator driver processinternal driver java 379 at com facebook presto operator driver lambda processfor 8 driver java 283 at com facebook presto operator driver trywithlock driver java 675 at com facebook presto operator driver processfor driver java 276 at com facebook presto execution sqltaskexecution driversplitrunner processfor sqltaskexecution java 1077 at com facebook presto execution executor prioritizedsplitrunner process prioritizedsplitrunner java 162 at com facebook presto execution executor taskexecutor taskrunner run taskexecutor java 483 |
prestodbpresto | incorrect result in joni with word boundary at end of line | Bug | when a word boundary appear at the end of line b win t match it even though it should example presto select regexp like test test b col0 false 1 row expect result presto select regexp like test test b col0 true 1 row this regression be introduce at the pr to fix it in airlift be here after that we should update the joni version in presto |
prestodbpresto | incorrect result in certain situation with multiple join with difference partition scheme | Bug | this be a bug introduce by 12013 the result would be wrong if the follow situation happen the query use coalesce joinkey on top of full outer join with equi join the child of the fulljoin node use a different hash function to compute the partition from the join key for example hash be compute on a constant and join key be just a there be another join with the result of full outer join use equi join on only the coalesce key of the full outer join in such situation the newly introduce optimization would assume that the result of the full outer join be already partition on coalesce a thus there s no need for another shuffle before the next join however because the hash function be calculate on a constant even if the datum be partition on a it would be on a different node as a hash function compute with just a thus a shuffle would still be need to produce correct result |
prestodbpresto | one or more partition already exist for table | Bug | during a batch insertion of record to my table default track action I run into the follow exception com facebook presto spi prestoexception one or more partition already exist for table default track action com facebook presto hive metastore thrifthivemetastore addpartition thrifthivemetastore java 526 com facebook presto hive metastore bridginghivemetastore addpartition bridginghivemetastore java 261 com facebook presto hive metastore cachinghivemetastore addpartition cachinghivemetastore java 697 com facebook presto hive metastore cachinghivemetastore addpartition cachinghivemetastore java 697 com facebook presto hive metastore semitransactionalhivemetastore partitionadder execute semitransactionalhivemetastore java 2219 com facebook presto hive metastore semitransactionalhivemetastore committer executeaddpartitionoperation semitransactionalhivemetastore java 1149 com facebook presto hive metastore semitransactionalhivemetastore committer access 1200 semitransactionalhivemetastore java 876 com facebook presto hive metastore semitransactionalhivemetastore commitshare semitransactionalhivemetastore java 825 this error be not reproducible mean it happen sometimes not always the table contain two partition column here be the table schema create external table if not exist default track action tivo pixel i d string ad unit i d string device i d string event string creative i d string client ip string line item i d string advertiser i d string order i d string description url string ppid string act date timestamp partition by act date timestamp tivo pixel i d string row format serde org apache hadoop hive ql io parquet serde parquethiveserde store as inputformat org apache hadoop hive ql io parquet mapredparquetinputformat outputformat org apache hadoop hive ql io parquet mapredparquetoutputformat location s3 |
prestodbpresto | joda to java bridge cause excessive cacheddatetimezone info object | Bug | while testing we find that 8ac4b8466a7db96d9941e27cecf7aaf64c85bfaf cause 180 gb heap to fill up with 145 150 gb of org joda time tz cacheddatetimezone it look like it s due to the jdkbasedzoneinfoprovider create cacheddatetimezone for all non fix zone in the static block haozhun would you have more context about this |
prestodbpresto | support non deterministic check for insert in verifier | Bug | currently only select do check for non determinism we should support such feature for insert query as well |
prestodbpresto | extra remote exchange when window partition be a super set of bucket column | Bug | presto tiny create table test bucket bucket key int foo varchar bar varchar partition key varchar with partition by array partition key bucket by array bucket key bucket count 16 create table presto tiny insert into test bucket value 1 foo bar 2018 12 18 insert 1 row query 20181219 202234 58401 d46p5 finish 18 node split 22 total 22 do 100 00 0 06 0 row 0b 0 rows s 0b s presto tiny explain type distribute select rank over partition by bucket key from test bucket query plan fragment 0 single output layout rank output partition single group execution false output col0 rank bigint col0 rank remotesource 1 rank bigint fragment 1 hash output layout rank output partition single group execution false project rank bigint window partition by bucket key hashvalue bucket key integer hashvalue bigint rank bigint rank rank range unbounded precede current row localexchange hash hashvalue bucket key bucket key integer hashvalue bigint remotesource 2 bucket key integer hashvalue 4 bigint fragment 2 prism bucket 16 hivetype int output layout bucket key hashvalue 5 output partition hash bucket key hashvalue 5 group execution false scanproject table prism di test bucket group false bucket key integer hashvalue 5 bigint hashvalue 5 combine hash bigint 0 coalesce operator hash code bucket key 0 layout di test bucket bucket 16 bucket key bucket key int 0 regular partition key string 1 partition key 2018 12 18 1 row query 20181219 202654 59652 d46p5 finish 1 node split 1 total 1 do 100 00 0 00 0 row 0b 0 rows s 0b s look to I if window partition e g a b c be a super set of bucket column e g a b we don t need to do a remote exchange since the require row be available locally in this way fragment 1 and 2 could be combine into one fragment let I know if I m miss some obvious essential part if it look good I could work on this optimization cc wenleix haozhun |
prestodbpresto | planprinter print partialsort for the only sort when distribute sort be enable | Bug | step to reproduce 1 a modification of presto source code be require to get a plan print at the stage before exchange be insert into the plan diff diff git presto main src main java com facebook presto sql planner logicalplanner java presto main src main java com facebook presto sql planner logicalplanner java index 39fb55ce18 dbdc9c317d 100644 presto main src main java com facebook presto sql planner logicalplanner java presto main src main java com facebook presto sql planner logicalplanner java 156 6 156 10 public class logicalplanner plannode root planstatement analysis analysis getstatement system out println create plan system out println n com facebook presto sql planner planprinter planprinter textlogicalplan root symbolallocator gettype metadata getfunctionregistry statsandcost empty session 0 system out println eof create plan plansanitychecker validateintermediateplan root session metadata sqlparser symbolallocator gettype warningcollector if stage ordinal stage optimize ordinal 2 run a query with an order by sql select from nation order by nationkey the follow be print projection and symbol mapping be elide for brevity output nationkey name regionkey comment expr 8 bigint expr 9 varchar 25 expr 10 bigint expr 11 varchar 152 project expr 8 bigint expr 9 varchar 25 expr 10 bigint expr 11 varchar 152 project expr 4 bigint expr 5 varchar 25 expr 6 bigint expr 7 varchar 152 project expr bigint expr 0 varchar 25 expr 1 bigint expr 2 varchar 152 partialsort expr asc null last nationkey 3 bigint expr bigint expr 0 varchar 25 expr 1 bigint expr 2 varchar 152 project nationkey 3 bigint expr bigint expr 0 varchar 25 expr 1 bigint expr 2 varchar 152 scanproject table tpch tpch nation sf0 01 expr bigint expr 0 varchar 25 expr 1 bigint expr 2 varchar 152 nationkey bigint name varchar 25 regionkey bigint comment varchar 152 row number bigint now the only sorting that be do be partialsort there should be final sort this may be a glitch in planprinter that it incorrectly insert partial if only distribute sort be enable this may be an incorrect plan produce when distribute sort be enable which be only later make correct during planning process |
prestodbpresto | future should be do assertion in hashbuilderoperator | Bug | some query be fail with this stack trace cause by com google common base verifyexception future should be do at com google common base verify verify verify java 123 at com facebook presto memory defaultquerycontext tryupdateusermemory defaultquerycontext java 199 at com facebook presto memory defaultquerycontext querymemoryreservationhandler tryreservememory defaultquerycontext java 314 at com facebook presto memory context rootaggregatedmemorycontext tryupdatebyte rootaggregatedmemorycontext java 49 at com facebook presto memory context childaggregatedmemorycontext tryupdatebyte childaggregatedmemorycontext java 46 at com facebook presto memory context childaggregatedmemorycontext tryupdatebyte childaggregatedmemorycontext java 46 at com facebook presto memory context childaggregatedmemorycontext tryupdatebyte childaggregatedmemorycontext java 46 at com facebook presto memory context childaggregatedmemorycontext tryupdatebyte childaggregatedmemorycontext java 46 at com facebook presto memory context simplelocalmemorycontext trysetbyte simplelocalmemorycontext java 77 at com facebook presto operator operatorcontext internallocalmemorycontext trysetbyte operatorcontext java 599 at com facebook presto operator hashbuilderoperator updateindex hashbuilderoperator java 344 at com facebook presto operator hashbuilderoperator addinput hashbuilderoperator java 333 at com facebook presto operator driver processinternal driver java 384 at com facebook presto operator driver lambda processfor 8 driver java 283 at com facebook presto operator driver trywithlock driver java 675 at com facebook presto operator driver processfor driver java 276 at com facebook presto execution sqltaskexecution driversplitrunner processfor sqltaskexecution java 1065 at com facebook presto execution executor prioritizedsplitrunner process prioritizedsplitrunner java 162 at com facebook presto execution executor taskexecutor taskrunner run taskexecutor java 483 at com facebook presto gen presto 0 214 84 gad05dcb 20181206 001801 1 run unknown source at java base java util concurrent threadpoolexecutor runworker threadpoolexecutor java 1135 at java base java util concurrent threadpoolexecutor worker run threadpoolexecutor java 635 at java base java lang thread run thread java 844 |
prestodbpresto | array intersect return wrong result | Bug | array intersect would skip 0 value if the array contain both null and 0 value correct select array intersect array 0 array 0 0 wrong select array intersect array 0 null array 0 null correct select array intersect array 0 0 1 2 array 0 0 1 2 0 1 2 wrong select array intersect array 0 1 2 null array 0 1 2 null null 1 2 wrong select array intersect array 0 0 1 2 null array 0 0 1 2 null null 1 2 wrong select array intersect array 0 1 2 null array 0 1 2 null 1 2 correct select array intersect array 0 0 array 0 0 null 0 wrong select array intersect array 0 0 null array 0 0 null null this be because it use type equalto when advance the index with same array value and it doesn t distinguish between 0 and null |
prestodbpresto | array distinct return wrong result | Bug | array distinct can t distinguish null from 0 value e g 0 for integer or false for boolean when there re 2 element in the array example correct select array distinct array null 0 1 null 0 1 correct select array distinct array null 0 0 null 0 wrong select array distinct array null 0 null correct select array distinct array null true null true correct select array distinct array null false false null false wrong select array distinct array null false null the problem be because it use type equalto to compare the element when the cardinality of array be two and type equalto doesn t check for nullness |
prestodbpresto | unsupported rowexpression type lambdadefinitionexpression | Bug | reproducible query with t as select from value 1 2 c d 2018 11 01 as t a b c d ds select label from select if p q 1 0 as label from select reduce array agg a cast row 0 0 0 0 as row field0 double field1 double s x cast row s field0 s field1 as row field0 double field1 double s s field0 s field1 as p reduce array agg a cast row 0 0 0 0 as row field0 double field1 double s x cast row s field0 s field1 as row field0 double field1 double s s field0 s field1 as q from t where ds 2018 11 01 and d test group by c where p 0 75 and q 0 75 the query above work if I remove where p 0 75 and q 0 75 I find commit 92b8a88 by bisecting from 0 213 |
prestodbpresto | support streaming for s3 write | Enhancement | we could add streaming support to prestos3outputstream by change it to manually perform a multi part upload that run for the duration of the write operation rather than have a single temporary file that be upload at the end it would create multiple file of the multipart size limit then initiate the upload of each one as it be ready user would probably want to set the abortincompletemultipartupload bucket lifecycle policy to cleanup upload in case where presto worker crash or otherwise can not abort they on failure |
prestodbpresto | invalid result for min max aggregation over float point | Bug | as state in issuecomment 324999652 select max a from value nan 1 0 t a nan select max a from value 1 0 nan t a 1 0 relate |
prestodbpresto | plan failure when hash generation optimization be turn on | Bug | sql select 1 from select a b from value 1 2 t a b where a 1 group by a b limit 1 group by a fail with query 20180927 174933 00021 zsw5 t fail node distinctlimitnode declare hash symbol not in the output java lang illegalstateexception node distinctlimitnode declare hash symbol not in the output at com google common base precondition checkstate precondition java 585 at com facebook presto sql planner optimizations hashgenerationoptimizer rewriter plan hashgenerationoptimizer java 746 at com facebook presto sql planner optimizations hashgenerationoptimizer rewriter planandenforce hashgenerationoptimizer java 684 at com facebook presto sql planner optimizations hashgenerationoptimizer rewriter visitexchange hashgenerationoptimizer java 531 at com facebook presto sql planner optimizations hashgenerationoptimizer rewriter visitexchange hashgenerationoptimizer java 118 at com facebook presto sql planner plan exchangenode accept exchangenode java 243 at com facebook presto sql planner optimizations hashgenerationoptimizer rewriter plan hashgenerationoptimizer java 745 at com facebook presto sql planner optimizations hashgenerationoptimizer rewriter visitproject hashgenerationoptimizer java 606 at com facebook presto sql planner optimizations hashgenerationoptimizer rewriter visitproject hashgenerationoptimizer java 118 at com facebook presto sql planner plan projectnode accept projectnode java 92 at com facebook presto sql planner optimizations hashgenerationoptimizer rewriter plan hashgenerationoptimizer java 745 at com facebook presto sql planner optimizations hashgenerationoptimizer rewriter planandenforce hashgenerationoptimizer java 684 at com facebook presto sql planner optimizations hashgenerationoptimizer rewriter visitaggregation hashgenerationoptimizer java 171 at com facebook presto sql planner optimizations hashgenerationoptimizer rewriter visitaggregation hashgenerationoptimizer java 118 at com facebook presto sql planner plan aggregationnode accept aggregationnode java 198 at com facebook presto sql planner optimizations hashgenerationoptimizer rewriter plan hashgenerationoptimizer java 745 at com facebook presto sql planner optimizations hashgenerationoptimizer rewriter planandenforce hashgenerationoptimizer java 684 at com facebook presto sql planner optimizations hashgenerationoptimizer rewriter visitexchange hashgenerationoptimizer java 531 at com facebook presto sql planner optimizations hashgenerationoptimizer rewriter visitexchange hashgenerationoptimizer java 118 at com facebook presto sql planner plan exchangenode accept exchangenode java 243 at com facebook presto sql planner optimizations hashgenerationoptimizer rewriter plan hashgenerationoptimizer java 745 at com facebook presto sql planner optimizations hashgenerationoptimizer rewriter planandenforce hashgenerationoptimizer java 684 at com facebook presto sql planner optimizations hashgenerationoptimizer rewriter visitaggregation hashgenerationoptimizer java 171 at com facebook presto sql planner optimizations hashgenerationoptimizer rewriter visitaggregation hashgenerationoptimizer java 118 at com facebook presto sql planner plan aggregationnode accept aggregationnode java 198 at com facebook presto sql planner optimizations hashgenerationoptimizer rewriter plan hashgenerationoptimizer java 745 at com facebook presto sql planner optimizations hashgenerationoptimizer rewriter visitproject hashgenerationoptimizer java 606 at com facebook presto sql planner optimizations hashgenerationoptimizer rewriter visitproject hashgenerationoptimizer java 118 at com facebook presto sql planner plan projectnode accept projectnode java 92 at com facebook presto sql planner optimizations hashgenerationoptimizer rewriter plan hashgenerationoptimizer java 745 at com facebook presto sql planner optimizations hashgenerationoptimizer rewriter planandenforce hashgenerationoptimizer java 684 at com facebook presto sql planner optimizations hashgenerationoptimizer rewriter plansimplenodewithpropertie hashgenerationoptimizer java 668 at com facebook presto sql planner optimizations hashgenerationoptimizer rewriter plansimplenodewithpropertie hashgenerationoptimizer java 655 at com facebook presto sql planner optimizations hashgenerationoptimizer rewriter visitplan hashgenerationoptimizer java 135 at com facebook presto sql planner optimizations hashgenerationoptimizer rewriter visitplan hashgenerationoptimizer java 118 at com facebook presto sql planner plan planvisitor visitoutput planvisitor java 49 at com facebook presto sql planner plan outputnode accept outputnode java 82 at com facebook presto sql planner optimization hashgenerationoptimizer optimize hashgenerationoptimizer java 112 at com facebook presto sql planner logicalplanner plan logicalplanner java 150 at com facebook presto sql planner logicalplanner plan logicalplanner java 139 at com facebook presto execution sqlqueryexecution doanalyzequery sqlqueryexecution java 362 at com facebook presto execution sqlqueryexecution analyzequery sqlqueryexecution java 347 at com facebook presto execution sqlqueryexecution start sqlqueryexecution java 291 at java util concurrent threadpoolexecutor runworker threadpoolexecutor java 1149 at java util concurrent threadpoolexecutor worker run threadpoolexecutor java 624 at java lang thread run thread java 748 this be probably a side effect of 032575a1f2d47de2cc034716de645ce3c1b14281 |
prestodbpresto | add rowid support to get a row number surrogate | Enhancement | what introduce rowid support that provide a unique reference to every row read from a dataset this do not have to be continuous I e rowid s for a 1 billion row dataset don t have to range from 1 to 1b it doesn t even have to be a number as long as it be 1 unique and deterministic for each physical row read and be 2 cheap to compute it can provide a terrific alternative to row number which be often use to achieve this featureset why this can help address several use case that need a unique identifier when the dataset doesn t have an obvious key like 1 debugging and trace datum back from downstream 2 case that need unique row reference that currently use row number or a similar proxy but this end up be very inefficient |
prestodbpresto | show stat column projection | Bug | the show stat command accept column projection in the form show stat for select column1 from table however they be not apply we should probably implement this or disallow it |
prestodbpresto | the presto jdbc statement execute method return true even for ddl statement | Bug | if a ddl task be not yet submit a default empty queryresult be return to the client which have getupdatetype null when it should be set to the task name ex create table create schema etc from com facebook presto jdbc prestostatement internalexecute if client currentstatusinfo getupdatetype null currentresult set resultset return true from com facebook presto server protocol query getnextresult if query query submission have not finish return simple empty result if submissionfuture isdone queryresult queryresult new queryresult queryid tostre queryhtmluri null createnextresultsuri scheme uriinfo null null statementstat builder setstate querystate queue tostring setqueue true setschedule false build null immutablelist of null null cachelastresult queryresult return queryresult |
prestodbpresto | thriftindexhandle tostring have raw tupledomain | Bug | it need to properly convert the tupledomain into a string as tupledomain do not have a tostring method |
prestodbpresto | add support for postgre array type in postgresql connector | Enhancement | this could be expose to presto from postgresql connector as an unbounded varchar or a presto array type |
prestodbpresto | plan error when aliase table colum | Bug | sql select 1 from order as t a b c d e f g h I fail with java lang illegalargumentexception number of output 10 doesn t match number of field in scope tree 9 at com google common base precondition checkargument precondition java 294 at com facebook presto sql planner relationplan relationplan java 51 at com facebook presto sql planner relationplanner visitaliasedrelation relationplanner java 170 at com facebook presto sql planner relationplanner visitaliasedrelation relationplanner java 98 at com facebook presto sql tree aliasedrelation accept aliasedrelation java 71 at com facebook presto sql tree astvisitor process astvisitor java 27 at com facebook presto sql planner queryplanner planfrom queryplanner java 262 at com facebook presto sql planner queryplanner plan queryplanner java 143 at com facebook presto sql planner relationplanner visitqueryspecification relationplanner java 597 at com facebook presto sql planner relationplanner visitqueryspecification relationplanner java 98 at com facebook presto sql tree queryspecification accept queryspecification java 127 at com facebook presto sql tree astvisitor process astvisitor java 27 at com facebook presto sql planner queryplanner planquerybody queryplanner java 251 at com facebook presto sql planner queryplanner plan queryplanner java 123 at com facebook presto sql planner relationplanner visitquery relationplanner java 590 at com facebook presto sql planner relationplanner visitquery relationplanner java 98 at com facebook presto sql tree query accept query java 94 at com facebook presto sql tree astvisitor process astvisitor java 27 at com facebook presto sql planner logicalplanner createrelationplan logicalplanner java 439 at com facebook presto sql planner logicalplanner planstatementwithoutoutput logicalplanner java 190 at com facebook presto sql planner logicalplanner planstatement logicalplanner java 171 at com facebook presto sql planner logicalplanner plan logicalplanner java 144 at com facebook presto sql planner logicalplanner plan logicalplanner java 139 at com facebook presto execution sqlqueryexecution doanalyzequery sqlqueryexecution java 344 at com facebook presto execution sqlqueryexecution analyzequery sqlqueryexecution java 329 at com facebook presto execution sqlqueryexecution start sqlqueryexecution java 285 at java base java util concurrent threadpoolexecutor runworker threadpoolexecutor java 1135 at java base java util concurrent threadpoolexecutor worker run threadpoolexecutor java 635 at java base java lang thread run thread java 844 |
prestodbpresto | query information schema with uppercase name fail | Bug | for example if you do presto test select 1 from information schema column where table schema schema and table name name query 20180823 194720 62752 z8m8y fail objectname be not lowercase name this should not fail though |
prestodbpresto | testprestodriver testquerycancelbyinterrupt be flaky | Bug | error test run 99 failure 1 error 0 skip 0 time elapse 69 013 s failure in testsuite error testquerycancelbyinterrupt com facebook presto jdbc testprestodriver time elapse 1 399 s failure org testng internal thread threadtimeoutexception method com facebook presto jdbc testprestodriver testquerycancelbyinterrupt didn t finish within the time out 10000 |
prestodbpresto | improper predicate pushdown with empty grouping set | Bug | sql with t as select a from value 1 2 as u a group by group set a select from t where a be not null incorrectly produce a 1 null this should be filter out 2 query plan output a a gid integer a a gid project a gid integer aggregate final a gid groupid hashvalue a gid integer groupid bigint hashvalue bigint localexchange hash hashvalue a gid groupid a gid integer groupid bigint hashvalue bigint aggregate partial a gid groupid hashvalue 10 a gid integer groupid bigint hashvalue 10 bigint filterproject filterpredicate not a gid be null a gid integer groupid bigint hashvalue 10 bigint cost row cpu memory network row cpu memory network hashvalue 10 combine hash combine hash bigint 0 coalesce operator hash code a gid 0 coalesce operator hash groupid field a gid integer groupid bigint a gid field localexchange round robin field integer cost row 2 10b cpu 10 00 memory 0 00 network 0 00 value field integer cost row 2 10b cpu 0 00 memory 0 00 network 0 00 1 2 the be that while it s safe to push below an aggregation with no empty grouping set because they will ultimately be filter out anyway the empty grouping set have to produce a row so the filter have to be retain above the aggregation in that case this be analogous to push down a filter through a global aggregation |
prestodbpresto | race condition in outerpositiontracker | Bug | this be a reoccurrence of 9766 and 9982 com google common base verifyexception at com google common base verify verify verify java 99 at com facebook presto operator partitionedlookupsource outerpositiontracker positionvisite partitionedlookupsource java 330 at com facebook presto operator partitionedlookupsource appendto partitionedlookupsource java 179 at com facebook presto operator lookupjoinpagebuilder appendrow lookupjoinpagebuilder java 78 at com facebook presto operator lookupjoinoperator joincurrentposition lookupjoinoperator java 540 at com facebook presto operator lookupjoinoperator processprobe lookupjoinoperator java 467 at com facebook presto operator lookupjoinoperator lambda processprobe 3 lookupjoinoperator java 399 at com facebook presto operator partitionedlookupsourcefactory spillawarelookupsourceprovider withlease partitionedlookupsourcefactory java 432 at com facebook presto operator lookupjoinoperator processprobe lookupjoinoperator java 396 at com facebook presto operator lookupjoinoperator getoutput lookupjoinoperator java 311 at com facebook presto operator driver processinternal driver java 373 at com facebook presto operator driver lambda processfor 8 driver java 282 at com facebook presto operator driver trywithlock driver java 672 at com facebook presto operator driver processfor driver java 276 at com facebook presto execution sqltaskexecution driversplitrunner processfor sqltaskexecution java 973 at com facebook presto execution executor prioritizedsplitrunner process prioritizedsplitrunner java 162 at com facebook presto execution executor taskexecutor taskrunner run taskexecutor java 477 at java base java util concurrent threadpoolexecutor runworker threadpoolexecutor java 1135 at java base java util concurrent threadpoolexecutor worker run threadpoolexecutor java 635 at java base java lang thread run thread java 844 |
prestodbpresto | optimize arbitrary aggregation | Enhancement | I have a use case of remove duplicate row from a large table by a unique key select unique key arbitrary huge column as huge column from my table group by unique key presto put huge column in memory while the only thing that need to be remember be unique key as we can flush the value immediately if unique key be much small than huge column this make a big difference in memory consumption could this be optimise if arbitrary be the only aggregation value could be flush right away without put they in memory a more generic optimisation could be to decide whether to finish the iteration inside each aggregation function I e return a value to indicate whether it s an intermediate or final result in the latter case the result could be flush right away datum state init partialstate result reduce state key value state cc electrum |
prestodbpresto | endpoint doesn t respect the x forward proto header | Bug | hi when access to with x forward proto header presto return http url in location header I expect to return https url in this case rpm qa presto server rpm presto server rpm 0 206 1 x86 64 curl I h x forward proto https http 1 1 301 move permanently date we d 01 aug 2018 12 09 50 gmt location content length 0 |
prestodbpresto | glue integration create table fail with npe parameter be null in some case | Bug | with presto 0 203 when a glue database schema be create from aws glue or create via presto create schema but later edit via aws web ui eg set the location property then create table use that schema fail in presto it s somewhat similar to but that have be fix with fix which be present in 0 203 presto create table glue test foo a int query 20180731 151404 00138 wx7wd fail java lang nullpointerexception parameter be null com google common util concurrent uncheckedexecutionexception java lang nullpointerexception parameter be null at com google common cache localcache segment get localcache java 2052 at com google common cache localcache get localcache java 3943 at com google common cache localcache getorload localcache java 3967 at com google common cache localcache localloadingcache get localcache java 4952 at com google common cache localcache localloadingcache getunchecke localcache java 4958 at com facebook presto hive metastore cachinghivemetastore get cachinghivemetastore java 238 at com facebook presto hive metastore cachinghivemetastore getdatabase cachinghivemetastore java 261 at com facebook presto hive metastore semitransactionalhivemetastore getdatabase semitransactionalhivemetastore java 126 at com facebook presto hive hivewriteutil getdatabase hivewriteutil java 465 at com facebook presto hive hivewriteutil gettabledefaultlocation hivewriteutil java 445 at com facebook presto hive hivelocationservice fornewtable hivelocationservice java 55 at com facebook presto hive hivemetadata createtable hivemetadata java 628 at com facebook presto spi connector classloader classloadersafeconnectormetadata createtable classloadersafeconnectormetadata java 227 at com facebook presto metadata metadatamanager createtable metadatamanager java 547 at com facebook presto execution createtabletask internalexecute createtabletask java 175 at com facebook presto execution createtabletask execute createtabletask java 81 at com facebook presto execution createtabletask execute createtabletask java 63 at com facebook presto execution datadefinitionexecution start datadefinitionexecution java 124 at java util concurrent threadpoolexecutor runworker threadpoolexecutor java 1149 at java util concurrent threadpoolexecutor worker run threadpoolexecutor java 624 at java lang thread run thread java 748 cause by java lang nullpointerexception parameter be null at java util object requirenonnull object java 228 at com facebook presto hive metastore database builder setparameter database java 152 at com facebook presto hive metastore glue converter gluetoprestoconverter convertdatabase gluetoprestoconverter java 56 at com facebook presto hive metastore glue gluehivemetastore getdatabase gluehivemetastore java 168 at com facebook presto hive metastore cachinghivemetastore loaddatabase cachinghivemetastore java 266 at com google common cache cacheloader functiontocacheloader load cacheloader java 165 at com google common cache cacheloader 1 load cacheloader java 188 at com google common cache localcache loadingvaluereference loadfuture localcache java 3524 at com google common cache localcache segment loadsync localcache java 2273 at com google common cache localcache segment lockedgetorload localcache java 2156 at com google common cache localcache segment get localcache java 2046 20 more |
prestodbpresto | optimize execution of correlate subquerie with equi predicate | Enhancement | currently correlate scalar subquerie be translate to a left join since a left join may return more than a single match for a single row from the probe leave side table the deduplication be need the deduplication be do by assign unique i d for every row of a probe leave side table and than by do aggregation remove all duplicate markdistinct filterandproject the deduplication algorithm be cpu consume 2 additional projection over a probe table aggregation over a probe table and memory consume it require a probe table to fit in memory instead of do left outer join deduplication we can do leave outer semi join the idea be to make the join operator return no more than a single match it can be do by take one of the approach 1 pass a flag to the lookupjoinoperator say that no more than a single match be need with this approach extra match will be filter on the join stage 2 pass a flag to the hashbuilderoperator say that no more that a single entry for a give key be need effectively skip extra entry this approach be more efficient but also more limited it work only if the criterion be a simple equality on the join key with no extra filter |
prestodbpresto | incorrect behavior for distinct grouping set with mixed reference to same column | Bug | this query sql select group a from value 1 t a group by distinct grouping set a t a incorrectly produce two grouping set col0 0 0 plan output col0 expr 2 integer col0 expr 2 project expr 2 integer expr 2 literal array integer from base64 cqaaaelovf9buljbwqiaaaaaaaaaaaaaaaa groupid bigint 1 aggregate final a gid groupid hashvalue a gid integer groupid bigint hashvalue bigint localexchange hash hashvalue a gid groupid a gid integer groupid bigint hashvalue bigint aggregate partial a gid groupid hashvalue 6 a gid integer groupid bigint hashvalue 6 bigint project a gid integer groupid bigint hashvalue 6 bigint hashvalue 6 combine hash combine hash bigint 0 coalesce operator hash code a gid 0 c groupid field field a gid integer groupid bigint a gid field localexchange round robin field integer cost row 1 5b cpu 5 00 memory 0 00 network 0 00 value field integer cost row 1 5b cpu 0 00 memory 0 00 network 0 00 1 |
prestodbpresto | preparedstatement close do not deallocate the prepared statement from session | Bug | hi guy here be the version osx do the same on my production environment ubuntu presto jdbc driver 0 206 presto cli 0 206 same for presto server nifi stable 1 7 1 the actual issue I be use nifi and its dbcpconnectionpool to query presto with the jdbc driver it work the first few time but after a while it doesn t work anymore and I get the follow error on presto side tail f usr local var presto data var log server log 2018 07 23t17 32 11 402 0200 warn http worker 520 org eclipse jetty http httpparser header be too large 8193 8192 the first request send to presto via nifi find it via mitmproxy be x presto user micka x presto source presto jdbc x presto time zone europe paris x presto language en us x presto transaction i d none x presto client capability path user agent presto jdbc driver 0 206 content type text plain charset utf 8 content length 64 host 127 0 0 1 connection keep alive accept encode gzip raw body prepare statement1 from select from pg public csv test limit 5 the seconde one be x presto user micka x presto source presto jdbc x presto time zone europe paris x presto language en us x presto prepared statement statement1 select 0afrom 0a pg public csv test 0alimit 5 0a x presto transaction i d none x presto client capability path user agent presto jdbc driver 0 206 content type text plain charset utf 8 content length 18 host 127 0 0 1 connection keep alive accept encode gzip raw body execute statement1 when it stop work with the header to large error it be x presto user micka x presto source presto jdbc x presto time zone europe paris x presto language en us x presto prepared statement statement36 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement37 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement34 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement78 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement35 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement79 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement9 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement7 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement38 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement8 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement39 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement5 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement6 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement3 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement4 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement1 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement2 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement72 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement73 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement70 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement71 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement32 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement76 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement33 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement77 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement30 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement74 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement31 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement75 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement47 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement48 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement45 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement46 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement49 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement80 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement83 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement40 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement84 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement81 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement82 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement43 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement44 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement41 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement85 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement42 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement14 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement58 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement15 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement59 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement12 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement56 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement13 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement57 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement18 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement19 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement16 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement17 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement50 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement51 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement10 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement54 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement11 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement55 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement52 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement53 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement25 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement69 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement26 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement23 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement67 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement24 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement68 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement29 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement27 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement28 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement61 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement62 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement60 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement21 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement65 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement22 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement66 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement63 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement20 select 0afrom 0a pg public csv test 0alimit 5 0a x presto prepared statement statement64 select 0afrom 0a pg public csv test 0alimit 5 0a x presto transaction i d none x presto client capability path user agent presto jdbc driver 0 206 content type text plain charset utf 8 content length 19 host 127 0 0 1 connection keep alive accept encode gzip raw body execute statement85 why I post it here I use the exact same flow with the postgresql jdbc driver and it work perfectly so I figure the issue might be in the prestodb jdbc driver reproduce it the bug be easily reproducible in a local environment 1 install nifi 2 install presto create a catalog any will do 3 download the official presto jdbc driver and move into a directory accessible by nifi 4 configure nifi to query presto each 2 second 5 capture the request use a tool such as mitmproxy my presto server run on 127 0 0 1 9090 I configure nifi to query presto on 127 0 0 1 8484 and use mitmproxy in between like so mitmproxy mode reverse listen host 127 0 0 1 listen port 8484 replacement s 127 0 0 1 127 0 0 1 9090 the nifi dataflow screen shoot 2018 07 23 at 17 11 42 the executequery configuration screen shoot 2018 07 23 at 17 14 53 the dbcpconnectionpool configuration screen shoot 2018 07 23 at 17 14 28 |
prestodbpresto | testproxyserver be flaky | Bug | error testpartialcancel com facebook presto proxy testproxyserver time elapse 6 823 s failure org testng internal thread threadtimeoutexception method com facebook presto proxy testproxyserver testpartialcancel didn t finish within the time out 10000 at com facebook presto proxy testproxyserver testpartialcancel testproxyserver java 194 error teardownserver com facebook presto proxy testproxyserver time elapse 16 909 s failure java lang runtimeexception java lang reflect invocationtargetexception at com facebook presto proxy testproxyserver teardownserver testproxyserver java 112 cause by java lang reflect invocationtargetexception at com facebook presto proxy testproxyserver teardownserver testproxyserver java 112 cause by com facebook presto spi prestoexception server be shut down at com facebook presto proxy testproxyserver teardownserver testproxyserver java 112 cause by java util concurrent rejectedexecutionexception task com facebook presto execution statemachine lambda 683 540469228 102dcb1d reject from java util concurrent threadpoolexecutor 4c8bc594 terminate pool size 0 active thread 0 queue task 0 complete task 87 at com facebook presto proxy testproxyserver teardownserver testproxyserver java 112 info info result info error failure error testproxyserver teardownserver 112 runtime java lang reflect invocationtarge error testproxyserver testpartialcancel 194 threadtimeout method com facebook pre info |
prestodbpresto | spill to disk for order by operator | Enhancement | be go through the doc and see spill to disk have be implement for join and aggregation have there be any proposal future plan for spill to disk for the order by operator |
prestodbpresto | npe for lateral join with unnest | Bug | sql select from value array 1 t x lateral select from unnest x fail with java lang nullpointerexception type can not be null at java util object requirenonnull object java 228 at com facebook presto sql analyzer expressionanalyzer setexpressiontype expressionanalyzer java 224 at com facebook presto sql analyzer expressionanalyzer visitor visitsymbolreference expressionanalyzer java 378 at com facebook presto sql analyzer expressionanalyzer visitor visitsymbolreference expressionanalyzer java 302 at com facebook presto sql tree symbolreference accept symbolreference java 41 at com facebook presto sql tree stackableastvisitor process stackableastvisitor java 26 at com facebook presto sql analyzer expressionanalyzer visitor process expressionanalyzer java 323 at com facebook presto sql analyzer expressionanalyzer analyze expressionanalyzer java 268 at com facebook presto sql analyzer expressionanalyzer analyzeexpression expressionanalyzer java 1524 at com facebook presto sql analyzer expressionanalyzer analyzeexpressionswithsymbol expressionanalyzer java 1477 at com facebook presto sql analyzer expressionanalyzer getexpressiontype expressionanalyzer java 1443 at com facebook presto sql planner localexecutionplanner visitor visitvalue localexecutionplanner java 1234 at com facebook presto sql planner localexecutionplanner visitor visitvalue localexecutionplanner java 653 at com facebook presto sql planner plan valuesnode accept valuesnode java 73 at com facebook presto sql planner localexecutionplanner visitor visitexchange localexecutionplanner java 2196 at com facebook presto sql planner localexecutionplanner visitor visitexchange localexecutionplanner java 653 at com facebook presto sql planner plan exchangenode accept exchangenode java 196 at com facebook presto sql planner localexecutionplanner visitor visitunnest localexecutionplanner java 1256 at com facebook presto sql planner localexecutionplanner visitor visitunnest localexecutionplanner java 653 at com facebook presto sql planner plan unnestnode accept unnestnode java 106 at com facebook presto sql planner localexecutionplanner visitor visitexchange localexecutionplanner java 2196 at com facebook presto sql planner localexecutionplanner visitor visitexchange localexecutionplanner java 653 at com facebook presto sql planner plan exchangenode accept exchangenode java 196 at com facebook presto sql planner localexecutionplanner visitor createnestedloopjoin localexecutionplanner java 1653 at com facebook presto sql planner localexecutionplanner visitor visitjoin localexecutionplanner java 1511 at com facebook presto sql planner localexecutionplanner visitor visitjoin localexecutionplanner java 653 at com facebook presto sql planner plan joinnode accept joinnode java 279 at com facebook presto sql planner localexecutionplanner visitor visitoutput localexecutionplanner java 701 at com facebook presto sql planner localexecutionplanner visitor visitoutput localexecutionplanner java 653 at com facebook presto sql planner plan outputnode accept outputnode java 82 at com facebook presto sql planner localexecutionplanner plan localexecutionplanner java 432 at com facebook presto sql planner localexecutionplanner plan localexecutionplanner java 358 at com facebook presto execution sqltaskexecutionfactory create sqltaskexecutionfactory java 85 at com facebook presto execution sqltask updatetask sqltask java 351 at com facebook presto execution sqltaskmanager updatetask sqltaskmanager java 354 at com facebook presto server taskresource createorupdatetask taskresource java 129 |
prestodbpresto | correlate subquerie do not handle coercion | Bug | presto tiny select 1 from nation n where 1 select n nationkey col0 1 1 row query 20180712 134539 00036 qa8mt finish 1 node split 20 total 20 do 100 00 0 00 25 row 0b 243 rows s 0b s presto tiny select 1 from nation n where 1 select cast n nationkey as decimal 7 2 query 20180712 134545 00037 qa8mt fail line 1 35 give correlate subquery be not support select 1 from nation n where 1 select cast n nationkey as decimal 7 2 as you could see above when correlate predicate require coercion then correlate subquery do not work cc anusudarsan |
prestodbpresto | remove unnecessary sort | Enhancement | now that we have distribute sort sorting can use a huge amount of resource there be only a few place where ordering be necessary and we should remove all other during optimization for example select count from select from order order by 1 |
prestodbpresto | name base struct field mapping for orc file | Bug | summary currently field in struct be map to the underlie datum base on the ordinal of the data field this approach do not work in the case where the table schema change to drop a field from the struct that be not the last field currently such a change will cause all field follow the drop field to be mis align detail current behavior consider the case of a struct be change to the datum of the delete column b will be assign to column c the datum from column c from the file which have datum for column b will be assign to column d desire behavior datum in the deleted column b should be ignore column c should be read correctly from file write before and after the schema change column d should be null when read file prior to the schema change and should be read in correctly from the file write after the schema change proposal similar to the hive orc use column name property create a hive orc use struct field name that map to the underlie datum base on field name rather than the position |
prestodbpresto | hive partition table do not translate null partition | Bug | the partition table return default partition for null partition rather than translate it into a sql null as happen when you query the underlying table |
prestodbpresto | filebasedsystemaccesscontrol do not fail when parse unknown rule | Bug | filebasedsystemaccesscontrol parse the file like schemas user alice bob schema default pv owner true user owner false table user alice bob schema default table temp privilege select insert delete ownership user alice bob schema pv table privilege select insert delete ownership user privilege select above file syntax be not support however parser do fail instead it return an empty list of rule which could be misleading for user |
prestodbpresto | filter clause incorrectly allow for coalesce | Bug | this should fail during analysis but it doesn t select coalesce 1 2 filter where true |
prestodbpresto | optimization add limit for distinct if all value be know | Enhancement | consider the follow query select distinct ds from t where i d 4 if the table layout guarantee a fix set of value for ds we can add a limit node allow the query to complete once all possible value have be produce |
prestodbpresto | addlocalexchange should reuse exact partition column order in aggregation | Enhancement | local exchange insert could be avoid singe aggregation use same symbol as join presto set session distribute join false set session presto explain select from value 1 2 t2 m n select x y from value 1 1 2 2 t x y group by y x where x m and y n query plan output m n x y field integer field 0 integer field integer field 0 integer cost row cpu memory network 0 00 m field n field 0 x field y field 0 innerjoin field field 4 and field 0 field 5 hashvalue hashvalue 35 field integer field 0 integer distribution replicate cost row cpu memory network 0 00 localexchange round robin field integer field 0 integer hashvalue bigint cost row 1 30b cpu 60 00 memory 0 00 network 0 00 project field integer field 0 integer hashvalue 34 bigint cost row 1 30b cpu 30 00 memory 0 00 network 0 00 hashvalue 34 combine hash combine hash bigint 0 coalesce operator hash code field 0 coalesce operator hash code field 0 0 value field integer field 0 integer cost row 1 20b cpu 0 00 memory 0 00 network 0 00 1 2 localexchange hash hashvalue 35 field 4 field 5 field 5 integer field 4 integer hashvalue 35 bigint cost row cpu memory network 0 00 project field 5 integer field 4 integer hashvalue 38 bigint cost row cpu memory network 0 00 hashvalue 38 combine hash combine hash bigint 0 coalesce operator hash code field 4 0 coalesce operator hash code field 5 0 aggregate final field 5 field 4 hashvalue 36 field 5 integer field 4 integer hashvalue 36 bigint cost row cpu memory network 0 00 localexchange hash hashvalue 36 field 5 field 4 field 5 integer field 4 integer hashvalue 36 bigint cost row cpu memory network 0 00 aggregate partial field 5 field 4 hashvalue 37 field 5 integer field 4 integer hashvalue 37 bigint cost row cpu 120 00 memory network 0 00 project field 4 integer field 5 integer hashvalue 37 bigint cost row 2 60b cpu 60 00 memory 0 00 network 0 00 hashvalue 37 combine hash combine hash bigint 0 coalesce operator hash code field 5 0 coalesce operator hash code field 4 0 value field 4 integer field 5 integer cost row 2 40b cpu 0 00 memory 0 00 network 0 00 1 1 2 2 local exchange omit presto set session distribute join false set session presto explain select from value 1 2 t2 m n select x y from value 1 1 2 2 t x y group by x y where x m and y n query plan output m n x y field integer field 0 integer field integer field 0 integer cost row cpu memory network 0 00 m field n field 0 x field y field 0 innerjoin field field 4 and field 0 field 5 hashvalue hashvalue 35 field integer field 0 integer distribution replicate cost row cpu memory network 0 00 localexchange round robin field integer field 0 integer hashvalue bigint cost row 1 30b cpu 60 00 memory 0 00 network 0 00 project field integer field 0 integer hashvalue 34 bigint cost row 1 30b cpu 30 00 memory 0 00 network 0 00 hashvalue 34 combine hash combine hash bigint 0 coalesce operator hash code field 0 coalesce operator hash code field 0 0 value field integer field 0 integer cost row 1 20b cpu 0 00 memory 0 00 network 0 00 1 2 aggregate final field 4 field 5 hashvalue 35 field 4 integer field 5 integer hashvalue 35 bigint cost row cpu memory network 0 00 localexchange hash hashvalue 35 field 4 field 5 field 4 integer field 5 integer hashvalue 35 bigint cost row cpu memory network 0 00 aggregate partial field 4 field 5 hashvalue 36 field 4 integer field 5 integer hashvalue 36 bigint cost row cpu 120 00 memory network 0 00 project field 4 integer field 5 integer hashvalue 36 bigint cost row 2 60b cpu 60 00 memory 0 00 network 0 00 hashvalue 36 combine hash combine hash bigint 0 coalesce operator hash code field 4 0 coalesce operator hash code field 5 0 value field 4 integer field 5 integer cost row 2 40b cpu 0 00 memory 0 00 network 0 00 1 1 2 2 |
prestodbpresto | multiple pushaggregationthroughouterjoin issue | Bug | 1 query presto explain select x max x from select from value 1 t x leave join value 1 t2 y on t x t2 y group by x query be go server restart java lang illegalstateexception can not resolve symbol field at com google common base precondition checkstate precondition java 585 at com facebook presto sql planner expressionsymbolinliner visitor rewritesymbolreference expressionsymbolinliner java 68 at com facebook presto sql planner expressionsymbolinliner visitor rewritesymbolreference expressionsymbolinliner java 55 diagnosis pushaggregationthroughouterjoin should verify that aggregation don t contain probe symbol 2 with optimization presto select x count from select from value 1 t x leave join select from value 1 t2 y where false t2 y on true group by x x col1 1 0 1 row without presto set session push aggregation through join false set session presto select x count from select from value 1 t x leave join select from value 1 t2 y where false t2 y on true group by x x col1 1 1 1 row diagnosis pushaggregationthroughouterjoin shouldn t fire if default aggregation would be push to build side cc rschlussel2 |
prestodbpresto | invalid plan for complex order by expression involve lambda in group key | Bug | query select cardinality filter number x x 7 from value array 1 2 3 as t number group by cardinality filter number x x 7 order by cardinality filter number x x 7 error query 20180523 224742 00013 nx3i2 fail invalid node expression dependency expr 3 not in source plan output cardinality gid it look like the invalid project node be create here l168 l171 cc findepi it look like you write that code so maybe you have some context |
prestodbpresto | array distinct from operator fail with can not convert methodhandle | Bug | example stacktrace test state fail control state success java sql sqlexception query fail xxxxxxxxxxx can not convert methodhandle block block boolean to object boolean object boolean boolean at com facebook presto jdbc prestoresultset resultsexception prestoresultset java 1798 at com facebook presto jdbc prestoresultset resultspageiterator computenext prestoresultset java 1786 at com facebook presto jdbc prestoresultset resultspageiterator computenext prestoresultset java 1751 at com facebook presto jdbc internal guava collect abstractiterator trytocomputenext abstractiterator java 141 at com facebook presto jdbc internal guava collect abstractiterator hasnext abstractiterator java 136 at com facebook presto jdbc internal guava collect transformediterator hasnext transformediterator java 42 at com facebook presto jdbc internal guava collect iterators concatenatediterator gettopmetaiterator iterator java 1319 at com facebook presto jdbc internal guava collect iterators concatenatediterator hasnext iterator java 1335 at com facebook presto jdbc prestoresultset next prestoresultset java 142 at com facebook presto verifier validator convertjdbcresultset validator java 513 at sun reflect generatedmethodaccessor26 invoke unknown source at sun reflect delegatingmethodaccessorimpl invoke delegatingmethodaccessorimpl java 43 at java lang reflect method invoke method java 498 at com google common util concurrent simpletimelimiter 1 1 call simpletimelimiter java 95 at java util concurrent futuretask run futuretask java 266 at java util concurrent threadpoolexecutor runworker threadpoolexecutor java 1149 at java util concurrent threadpoolexecutor worker run threadpoolexecutor java 624 at java lang thread run thread java 748 at java util concurrent futuretask report futuretask java 122 at java util concurrent futuretask get futuretask java 206 at com google common util concurrent uninterruptible getuninterruptibly uninterruptible java 238 at com google common util concurrent simpletimelimiter callwithtimeout simpletimelimiter java 135 at com google common util concurrent simpletimelimiter access 100 simpletimelimiter java 48 at com google common util concurrent simpletimelimiter 1 invoke simpletimelimiter java 101 at com sun proxy proxy80 convert unknown source at com facebook presto verifier validator executequery validator java 439 at com facebook presto verifier validator executequeryt validator java 308 at com facebook presto verifier validator validate validator java 219 at com facebook presto verifier validator valid validator java 191 at java util concurrent executors runnableadapter call executor java 511 at java util concurrent futuretask run futuretask java 266 at java util concurrent executors runnableadapter call executor java 511 at java util concurrent futuretask run futuretask java 266 at java util concurrent threadpoolexecutor runworker threadpoolexecutor java 1149 at java util concurrent threadpoolexecutor worker run threadpoolexecutor java 624 at java lang thread run thread java 748 cause by com facebook presto spi prestoexception can not convert methodhandle block block boolean to object boolean object boolean boolean at com facebook presto util failure internalerror failure java 166 at com facebook presto operator scalar arraydistinctfromoperator isdistinctfrom arraydistinctfromoperator java 77 at com facebook presto gen pageshashstrategy 20180521 170900 65007 positionnotdistinctfromrow unknown source at com facebook presto operator multichannelgroupbyhash positionnotdistinctfromcurrentrow multichannelgroupbyhash java 421 at com facebook presto operator multichannelgroupbyhash putifabsent multichannelgroupbyhash java 265 at com facebook presto operator multichannelgroupbyhash putifabsent multichannelgroupbyhash java 255 at com facebook presto operator multichannelgroupbyhash access 200 multichannelgroupbyhash java 53 at com facebook presto operator multichannelgroupbyhash getnondictionarygroupidswork process multichannelgroupbyhash java 648 at com facebook presto operator distinctlimitoperator processunfinishedwork distinctlimitoperator java 222 at com facebook presto operator distinctlimitoperator addinput distinctlimitoperator java 167 at com facebook presto operator driver processinternal driver java 379 at com facebook presto operator driver lambda processfor 8 driver java 282 at com facebook presto operator driver trywithlock driver java 672 at com facebook presto operator driver processfor driver java 276 at com facebook presto execution sqltaskexecution driversplitrunner processfor sqltaskexecution java 973 at com facebook presto execution executor prioritizedsplitrunner process prioritizedsplitrunner java 162 at com facebook presto execution executor taskexecutor taskrunner run taskexecutor java 492 at java base java util concurrent threadpoolexecutor runworker threadpoolexecutor java 1135 at java base java util concurrent threadpoolexecutor worker run threadpoolexecutor java 635 at java base java lang thread run thread java 844 cause by java lang invoke wrongmethodtypeexception can not convert methodhandle block block boolean to object boolean object boolean boolean at java base java lang invoke methodhandle astypeuncached methodhandle java 858 at java base java lang invoke methodhandle astype methodhandle java 844 at java base java lang invoke invoker checkgenerictype invoker java 495 at com facebook presto operator scalar arraydistinctfromoperator isdistinctfrom arraydistinctfromoperator java 68 18 more |
prestodbpresto | add planner test for pushaggregationthroughouterjoin | Enhancement | as discuss in discussion r187426759 |
prestodbpresto | fix silent clamp in double to long cast | Bug | cast 9 3e18 as bigint should fail the same way as cast 2 2e9 as integer however it clamp silently right now presto di select cast 9 3e18 as bigint col0 9223372036854775807 1 row |
prestodbpresto | transformcorrelatedinpredicatetojoin should use plannodedecorrelator | Enhancement | this would widen correlate subquerie support for correlated in subquerie |
prestodbpresto | incorrect result due to bad assumption in pushaggregationthroughouterjoin | Bug | sql with t a b as value 1 a 1 b u a as value 1 select distinct v a from select distinct a b from t v leave join u on v a u a produce a 1 1 2 row query plan fragment 0 single output layout field output partition single execution flow ungrouped execution output a field integer a field remotesource 1 field integer fragment 1 hash output layout field output partition single execution flow ungrouped execution crossjoin field integer distribution replicate leftjoin field field 12 field integer distribution partition remotesource 2 field integer localexchange hash field 12 field 12 integer remotesource 3 field 12 integer localexchange single remotesource 4 fragment 2 single output layout field output partition hash field execution flow ungrouped execution project field integer cost row cpu memory network 0 00 aggregate final field field 0 field integer field 0 varchar 1 cost row cpu memory network 0 00 localexchange hash field field 0 field integer field 0 varchar 1 cost row cpu memory network 0 00 aggregate partial field field 0 field integer field 0 varchar 1 cost row cpu 40 00 memory network 0 00 value field integer field 0 varchar 1 cost row 2 40b cpu 0 00 memory 0 00 network 0 00 1 a 1 b fragment 3 single output layout field 12 output partition hash field 12 execution flow ungrouped execution aggregate final field 12 field 12 integer cost row cpu memory network 0 00 localexchange hash field 12 field 12 integer cost row cpu memory network 0 00 aggregate partial field 12 field 12 integer cost row cpu 10 00 memory network 0 00 value field 12 integer cost row 1 10b cpu 0 00 memory 0 00 network 0 00 1 fragment 4 single output layout output partition broadcast execution flow ungrouped execution aggregate cost row cpu 0 00 memory network 0 00 value cost row 1 0b cpu 0 00 memory 0 00 network 0 00 |
prestodbpresto | function implementation miss error be distinct from json json boolean not find | Bug | presto version 0 201 fail some query with the follow stack trace com google common util concurrent uncheckedexecutionexception com facebook presto spi prestoexception operator be distinct from json json boolean not find at com google common cache localcache segment get localcache java 2052 at com google common cache localcache get localcache java 3943 at com google common cache localcache getorload localcache java 3967 at com google common cache localcache localloadingcache get localcache java 4952 at com google common cache localcache localloadingcache getunchecke localcache java 4958 at com facebook presto sql gen joincompiler compilepageshashstrategyfactory joincompiler java 154 at com facebook presto sql gen joincompiler compilepageshashstrategyfactory joincompiler java 145 at com facebook presto operator multichannelgroupbyhash multichannelgroupbyhash java 131 at com facebook presto operator groupbyhash creategroupbyhash groupbyhash java 55 at com facebook presto operator aggregation builder inmemoryhashaggregationbuilder inmemoryhashaggregationbuilder java 119 at com facebook presto operator aggregation builder inmemoryhashaggregationbuilder inmemoryhashaggregationbuilder java 80 at com facebook presto operator hashaggregationoperator addinput hashaggregationoperator java 373 at com facebook presto operator driver processinternal driver java 379 at com facebook presto operator driver lambda processfor 8 driver java 282 at com facebook presto operator driver trywithlock driver java 672 at com facebook presto operator driver processfor driver java 276 at com facebook presto execution sqltaskexecution driversplitrunner processfor sqltaskexecution java 975 at com facebook presto execution executor prioritizedsplitrunner process prioritizedsplitrunner java 162 at com facebook presto execution executor taskexecutor taskrunner run taskexecutor java 492 at java base java util concurrent threadpoolexecutor runworker threadpoolexecutor java 1167 at java base java util concurrent threadpoolexecutor worker run threadpoolexecutor java 641 at java base java lang thread run thread java 844 cause by com facebook presto spi prestoexception operator be distinct from json json boolean not find at com facebook presto metadata functionregistry dogetspecializedfunctionkey functionregistry java 994 at com google common cache cacheloader functiontocacheloader load cacheloader java 165 at com google common cache localcache loadingvaluereference loadfuture localcache java 3524 at com google common cache localcache segment loadsync localcache java 2273 at com google common cache localcache segment lockedgetorload localcache java 2156 at com google common cache localcache segment get localcache java 2046 at com google common cache localcache get localcache java 3943 at com google common cache localcache getorload localcache java 3967 at com google common cache localcache localloadingcache get localcache java 4952 at com google common cache localcache localloadingcache getunchecke localcache java 4958 at com facebook presto metadata functionregistry getspecializedfunctionkey functionregistry java 920 at com facebook presto metadata functionregistry getscalarfunctionimplementation functionregistry java 909 at com facebook presto operator annotation scalarimplementationdependency resolve scalarimplementationdependency java 45 at com facebook presto operator annotation scalarimplementationdependency resolve scalarimplementationdependency java 26 at com facebook presto operator parametricfunctionhelper binddependencie parametricfunctionhelper java 32 at com facebook presto operator scalar annotation scalarimplementation specialize scalarimplementation java 150 at com facebook presto operator scalar parametricscalar specialize parametricscalar java 111 at com facebook presto metadata functionregistry lambda new 0 functionregistry java 379 at com google common cache cacheloader functiontocacheloader load cacheloader java 165 at com google common cache localcache loadingvaluereference loadfuture localcache java 3524 at com google common cache localcache segment loadsync localcache java 2273 at com google common cache localcache segment lockedgetorload localcache java 2156 at com google common cache localcache segment get localcache java 2046 at com google common cache localcache get localcache java 3943 at com google common cache localcache getorload localcache java 3967 at com google common cache localcache localloadingcache get localcache java 4952 at com google common cache localcache localloadingcache getunchecke localcache java 4958 at com facebook presto metadata functionregistry getscalarfunctionimplementation functionregistry java 909 at com facebook presto sql gen joincompiler generatepositionnotdistinctfromrowwithpagemethod joincompiler java 709 at com facebook presto sql gen joincompiler internalcompilehashstrategy joincompiler java 232 at com facebook presto sql gen joincompiler lambda new 1 joincompiler java 106 at com google common cache cacheloader functiontocacheloader load cacheloader java 165 at com google common cache localcache loadingvaluereference loadfuture localcache java 3524 at com google common cache localcache segment loadsync localcache java 2273 at com google common cache localcache segment lockedgetorload localcache java 2156 at com google common cache localcache segment get localcache java 2046 21 more |
prestodbpresto | can not request more datum when base processor be finish | Bug | I be run a pretty large query large in term of size of the key in group by which be like select i d date count from table where date between a and b group by 1 2 have count 1 the i d date combination be really huge and I be enable spill to disk it be on release 0 199 and the query run around half an hour then get fail due to java lang illegalstateexception can not request more datum when base processor be finish at com google common base precondition checkstate precondition java 504 at com facebook presto operator workprocessorutil 4 process workprocessorutil java 212 at com facebook presto operator workprocessorutil 5 process workprocessorutil java 241 at com facebook presto operator hashaggregationoperator getoutput hashaggregationoperator java 480 at com facebook presto operator driver processinternal driver java 392 at com facebook presto operator driver lambda processfor 8 driver java 281 at com facebook presto operator driver trywithlock driver java 687 at com facebook presto operator driver processfor driver java 275 at com facebook presto execution sqltaskexecution driversplitrunner processfor sqltaskexecution java 975 at com facebook presto execution executor prioritizedsplitrunner process prioritizedsplitrunner java 162 at com facebook presto execution executor taskexecutor taskrunner run taskexecutor java 492 at java util concurrent threadpoolexecutor runworker threadpoolexecutor java 1149 at java util concurrent threadpoolexecutor worker run threadpoolexecutor java 624 at java lang thread run thread java 748 what s happen here |
prestodbpresto | hive metastore glue connector fail when db table or partition be miss property | Bug | hi I m get a stacktrace when the glue database table and or partition be miss property I e property null 2018 05 07t09 40 43 497z warn http worker 137 com facebook presto server throwablemapper request fail for v1 statement java lang nullpointerexception at java util hashmap putmapentrie hashmap java 501 at java util linkedhashmap linkedhashmap java 384 at com facebook presto hive metastore table builder setparameter table java 240 at com facebook presto hive metastore glue converter gluetoprestoconverter converttable gluetoprestoconverter java 71 at com facebook presto hive metastore glue gluehivemetastore gettable gluehivemetastore java 202 at com facebook presto hive metastore cachinghivemetastore loadtable cachinghivemetastore java 255 at com google common cache cacheloader functiontocacheloader load cacheloader java 165 at com google common cache cacheloader 1 load cacheloader java 188 at com google common cache localcache loadingvaluereference loadfuture localcache java 3524 at com google common cache localcache segment loadsync localcache java 2273 at com google common cache localcache segment lockedgetorload localcache java 2156 at com google common cache localcache segment get localcache java 2046 at com google common cache localcache get localcache java 3943 at com google common cache localcache getorload localcache java 3967 at com google common cache localcache localloadingcache get localcache java 4952 at com facebook presto hive metastore cachinghivemetastore get cachinghivemetastore java 208 at com facebook presto hive metastore cachinghivemetastore gettable cachinghivemetastore java 250 at com facebook presto hive metastore semitransactionalhivemetastore gettable semitransactionalhivemetastore java 135 at com facebook presto hive hivemetadata getviews hivemetadata java 1096 at com facebook presto spi connector classloader classloadersafeconnectormetadata getview classloadersafeconnectormetadata java 328 at com facebook presto metadata metadatamanager getview metadatamanager java 788 at com facebook presto sql analyzer statementanalyzer visitor visittable statementanalyzer java 782 at com facebook presto sql analyzer statementanalyzer visitor visittable statementanalyzer java 253 at com facebook presto sql tree table accept table java 53 at com facebook presto sql tree astvisitor process astvisitor java 27 at com facebook presto sql analyzer statementanalyzer visitor process statementanalyzer java 265 at com facebook presto sql analyzer statementanalyzer visitor analyzefrom statementanalyzer java 1866 at com facebook presto sql analyzer statementanalyzer visitor visitqueryspecification statementanalyzer java 947 at com facebook presto sql analyzer statementanalyzer visitor visitqueryspecification statementanalyzer java 253 at com facebook presto sql tree queryspecification accept queryspecification java 127 at com facebook presto sql tree astvisitor process astvisitor java 27 at com facebook presto sql analyzer statementanalyzer visitor process statementanalyzer java 265 at com facebook presto sql analyzer statementanalyzer visitor process statementanalyzer java 275 at com facebook presto sql analyzer statementanalyzer visitor visitquery statementanalyzer java 676 at com facebook presto sql analyzer statementanalyzer visitor visitquery statementanalyzer java 253 at com facebook presto sql tree query accept query java 94 at com facebook presto sql tree astvisitor process astvisitor java 27 at com facebook presto sql analyzer statementanalyzer visitor process statementanalyzer java 265 at com facebook presto sql analyzer statementanalyzer analyze statementanalyzer java 239 at com facebook presto sql analyzer analyzer analyze analyzer java 72 at com facebook presto sql analyzer analyzer analyze analyzer java 64 at com facebook presto execution sqlqueryexecution sqlqueryexecution java 169 at com facebook presto execution sqlqueryexecution sqlqueryexecutionfactory createqueryexecution sqlqueryexecution java 643 could probably be solve with some replacement in presto hive src main java com facebook presto hive metastore glue converter gluetoprestoconverter java setparameter gluedb getparameter setparameter firstnonnull gluedb getparameter immutablemap of |
prestodbpresto | can not use min by with timestamp with time zone type | Bug | presto select min by 123 current timestamp query 20180430 192651 00000 rujhp fail unexpected response from this fail due to cause by java lang illegalargumentexception unknown type row timestamp with time zone boolean integer boolean at com google common base precondition checkargument precondition java 210 at com facebook presto type typedeserializer deserialize typedeserializer java 43 this be due to the follow return null java typeregistry gettype parsetypesignature row timestamp with time zone |
prestodbpresto | revocable memory overcommit use reserve pool | Enhancement | today when spill be enable query can allocate more memory than query max memory per node provide that everything above this limit be a revocable memory this work well when a cluster be configure to handle concurrent workload scenario concurrent cluster now consider a cluster configure for concurrent query e g 40 go to system pool or 30 as above query max memory per node will be small say 10 of the heap then reserve pool be 10 of the heap and user pool be only 50 of the heap in such scenario memory revocation kick in and some query start spill as soon as they allocate memoryrevokingthreshold user pool I e 45 of the heap however 10 of the heap the reserve pool be constantly waste never use scenario single query cluster consider a cluster be tune to handle single query workload such a cluster with have memory pool breakdown like this 40 go to system pool or 30 be heap headroom when be merge query max memory per node can be set to some big value below remain 60 of the heap let s say 50 of the heap then reserve pool be 50 of the heap and user pool be only 10 of the heap in such scenario memory revocation kick in and query start spill as soon as it allocate memoryrevokingthreshold user pool I e only 9 of the heap at the same time with spill disable when query doesn t use revocable memory query would be allow to use 50 of the heap before be kill propose solution we could utilize resource more effectively by leverage revocable memory s promise more since query allocate revocable memory make a promise that it will give the memory back when it s need we could let revocable memory to allocate from both user pool and reserve pool actually allocate from reserved pool first let query revocable memory be allocate from two pool from reserve pool first until reserved pool be fill up to memoryrevokingthreshold when a query be elevate to reserve pool all revocable memory allocate from that pool need to be revoce the operator that hold onto that memory need to get a chance to run until memory be revoke probably it s ok to let whole driver run until memory be revoke cc dain sopel39 ilfrin |
prestodbpresto | plan failure when column name be reuse in order by query | Bug | sql select k sum a a sum b a from value 1 2 3 t k a b group by k order by k fail with query 20180427 013334 04199 fv2gg fail line 3 9 column a be ambiguous com facebook presto sql analyzer semanticexception line 3 9 column a be ambiguous at com facebook presto sql analyzer semanticexception ambiguousattributeexception semanticexception java 44 at com facebook presto sql analyzer scope resolvefield scope java 137 at com facebook presto sql analyzer scope tryresolvefield scope java 130 at com facebook presto sql analyzer scope tryresolvefield scope java 111 at com facebook presto sql planner translationmap getsymbol translationmap java 313 at com facebook presto sql planner translationmap access 700 translationmap java 43 at com facebook presto sql planner translationmap 2 rewriteexpressionwithresolvedname translationmap java 253 at com facebook presto sql planner translationmap 2 rewriteidentifi translationmap java 247 at com facebook presto sql planner translationmap 2 rewriteidentifi translationmap java 222 at com facebook presto sql tree expressiontreerewriter rewritingvisitor visitidentifier expressiontreerewriter java 734 at com facebook presto sql tree expressiontreerewriter rewritingvisitor visitidentifier expressiontreerewriter java 70 at com facebook presto sql tree identifier accept identifier java 70 at com facebook presto sql tree astvisitor process astvisitor java 27 at com facebook presto sql tree expressiontreerewriter rewrite expressiontreerewriter java 58 at com facebook presto sql tree expressiontreerewriter rewrite expressiontreerewriter java 50 at com facebook presto sql tree expressiontreerewriter access 300 expressiontreerewriter java 25 at com facebook presto sql tree expressiontreerewriter rewritingvisitor visitfunctioncall expressiontreerewriter java 539 at com facebook presto sql tree expressiontreerewriter rewritingvisitor visitfunctioncall expressiontreerewriter java 70 at com facebook presto sql tree functioncall accept functioncall java 119 at com facebook presto sql tree astvisitor process astvisitor java 27 at com facebook presto sql tree expressiontreerewriter defaultrewrite expressiontreerewriter java 67 at com facebook presto sql planner translationmap 2 rewriteexpression translationmap java 226 at com facebook presto sql planner translationmap 2 rewriteexpression translationmap java 222 at com facebook presto sql tree expressionrewriter rewritefunctioncall expressionrewriter java 105 at com facebook presto sql tree expressiontreerewriter rewritingvisitor visitfunctioncall expressiontreerewriter java 479 at com facebook presto sql tree expressiontreerewriter rewritingvisitor visitfunctioncall expressiontreerewriter java 70 at com facebook presto sql tree functioncall accept functioncall java 119 at com facebook presto sql tree astvisitor process astvisitor java 27 at com facebook presto sql tree expressiontreerewriter rewrite expressiontreerewriter java 58 at com facebook presto sql tree expressiontreerewriter rewritewith expressiontreerewriter java 37 at com facebook presto sql planner translationmap translatenamestosymbol translationmap java 221 at com facebook presto sql planner translationmap put translationmap java 158 at com facebook presto sql planner queryplanner lambda planbuilderfor 1 queryplanner java 278 at com google common collect immutablelist foreach immutablelist java 407 at com google common collect immutablemapentryset regularentryset foreach immutablemapentryset java 72 at com facebook presto sql planner queryplanner planbuilderfor queryplanner java 278 at com facebook presto sql planner queryplanner plan queryplanner java 172 at com facebook presto sql planner relationplanner visitqueryspecification relationplanner java 594 at com facebook presto sql planner relationplanner visitqueryspecification relationplanner java 97 at com facebook presto sql tree queryspecification accept queryspecification java 127 at com facebook presto sql tree astvisitor process astvisitor java 27 at com facebook presto sql planner queryplanner planquerybody queryplanner java 253 at com facebook presto sql planner queryplanner plan queryplanner java 125 at com facebook presto sql planner relationplanner visitquery relationplanner java 587 at com facebook presto sql planner relationplanner visitquery relationplanner java 97 at com facebook presto sql tree query accept query java 94 at com facebook presto sql tree astvisitor process astvisitor java 27 at com facebook presto sql planner logicalplanner createrelationplan logicalplanner java 382 at com facebook presto sql planner logicalplanner planstatementwithoutoutput logicalplanner java 180 at com facebook presto sql planner logicalplanner planstatement logicalplanner java 161 at com facebook presto sql planner logicalplanner plan logicalplanner java 134 at com facebook presto sql planner logicalplanner plan logicalplanner java 129 at com facebook presto execution sqlqueryexecution doanalyzequery sqlqueryexecution java 310 at com facebook presto execution sqlqueryexecution analyzequery sqlqueryexecution java 295 at com facebook presto execution sqlqueryexecution start sqlqueryexecution java 251 at java base java util concurrent threadpoolexecutor runworker threadpoolexecutor java 1167 at java base java util concurrent threadpoolexecutor worker run threadpoolexecutor java 641 at java base java lang thread run thread java 844 the issue doesn t happen if the order by clause be remove or if the output of the select clause don t reuse the name of the from table |
prestodbpresto | bug presto geospatial map size overflow problem | Bug | presto presto geospatial src main java com facebook presto plugin geospatial bingtilefunction java private static int mapsize int zoomlevel return 256 zoomlevel since zoomlevel can be 1 23 it will over flow the map size |
prestodbpresto | problem with legacy row field access | Bug | the follow query fail with the stack trace below with r as select 1 max x t from value row row 3 4 s x group by 1 select t field0 from r com facebook presto sql analyzer semanticexception column input 0 field0 can not be resolve at com facebook presto sql analyzer semanticexceptions missingattributeexception semanticexception java 39 at com facebook presto sql analyzer expressionanalyzer visitor visitdereferenceexpression expressionanalyzer java 440 at com facebook presto sql analyzer expressionanalyzer visitor visitdereferenceexpression expressionanalyzer java 292 at com facebook presto sql tree dereferenceexpression accept dereferenceexpression java 54 at com facebook presto sql tree stackableastvisitor process stackableastvisitor java 26 at com facebook presto sql analyzer expressionanalyzer visitor process expressionanalyzer java 313 at com facebook presto sql analyzer expressionanalyzer analyze expressionanalyzer java 263 at com facebook presto sql analyzer expressionanalyzer analyzeexpression expressionanalyzer java 1498 at com facebook presto sql analyzer expressionanalyzer analyzeexpression expressionanalyzer java 1480 at com facebook presto sql analyzer expressionanalyzer analyzeexpressionswithinput expressionanalyzer java 1468 at com facebook presto sql analyzer expressionanalyzer getexpressiontypesfrominput expressionanalyzer java 1439 at com facebook presto sql planner localexecutionplanner visitor visitscanfilterandproject localexecutionplanner java 1137 at com facebook presto sql planner localexecutionplanner visitor visitproject localexecutionplanner java 1075 at com facebook presto sql planner localexecutionplanner visitor visitproject localexecutionplanner java 646 at com facebook presto sql planner plan projectnode accept projectnode java 92 at com facebook presto sql planner localexecutionplanner visitor visitoutput localexecutionplanner java 697 at com facebook presto sql planner localexecutionplanner visitor visitoutput localexecutionplanner java 646 at com facebook presto sql planner plan outputnode accept outputnode java 82 at com facebook presto sql planner localexecutionplanner plan localexecutionplanner java 425 at com facebook presto sql planner localexecutionplanner plan localexecutionplanner java 351 at com facebook presto execution sqltaskexecutionfactory create sqltaskexecutionfactory java 83 at com facebook presto execution sqltask updatetask sqltask java 350 at com facebook presto execution sqltaskmanager updatetask sqltaskmanager java 324 at com facebook presto server taskresource createorupdatetask taskresource java 129 at jdk internal reflect generatedmethodaccessor260 invoke unknown source at java base jdk internal reflect delegatingmethodaccessorimpl invoke delegatingmethodaccessorimpl java 43 at java base java lang reflect method invoke method java 564 |
prestodbpresto | exponential processing time and memory usage in predicatepushdown | Bug | query of this shape consume exponential amount of memory and cpu sql with t1 v as value 1 t2 as select if v 0 v v v from t1 t3 as select if v 0 v v v from t2 t4 as select if v 0 v v v from t3 t5 as select if v 0 v v v from t4 t6 as select if v 0 v v v from t5 t7 as select if v 0 v v v from t6 t8 as select if v 0 v v v from t7 t9 as select if v 0 v v v from t8 t10 as select if v 0 v v v from t9 t11 as select if v 0 v v v from t10 t12 as select if v 0 v v v from t11 t13 as select if v 0 v v v from t12 t14 as select if v 0 v v v from t13 t15 as select if v 0 v v v from t14 t16 as select if v 0 v v v from t15 select from t16 where v 0 the issue appear to be cause by l203 one possible short term fix be to adjust the inline heuristic to only do it if the expression be trivial or appear only once similar to how the inlineprojection rule work the long term fix be to move predicatepushdown to iterative optimizer rule that simply avoid unproductive pushdown action like the one cause by this query |
prestodbpresto | leave join fail with a fix distribution be require for join when spill be enable | Bug | I ve start experiment with enable spilling on a 3 node cluster it seem when a query on the right side of a left join have a non existent partition the query consistently fail with a fix distribution be require for join when spill be enable this query otherwise run fine with spill disabled on the presto user forum findepi indicate this be cause by the planner create a plan where spilling be not possible to do here be the full stack trace java lang illegalstateexception a fix distribution be require for join when spill be enable at com google common base precondition checkstate precondition java 444 at com facebook presto sql planner localexecutionplanner visitor getjoinoperatorscountforspill localexecutionplanner java 2008 at com facebook presto sql planner localexecutionplanner visitor createlookupjoin localexecutionplanner java 1988 at com facebook presto sql planner localexecutionplanner visitor createlookupjoin localexecutionplanner java 1821 at com facebook presto sql planner localexecutionplanner visitor visitjoin localexecutionplanner java 1526 at com facebook presto sql planner localexecutionplanner visitor visitjoin localexecutionplanner java 646 at com facebook presto sql planner plan joinnode accept joinnode java 221 at com facebook presto sql planner localexecutionplanner visitor visitscanfilterandproject localexecutionplanner java 1115 at com facebook presto sql planner localexecutionplanner visitor visitproject localexecutionplanner java 1075 at com facebook presto sql planner localexecutionplanner visitor visitproject localexecutionplanner java 646 at com facebook presto sql planner plan projectnode accept projectnode java 92 at com facebook presto sql planner localexecutionplanner plan localexecutionplanner java 425 at com facebook presto sql planner localexecutionplanner plan localexecutionplanner java 396 at com facebook presto execution sqltaskexecutionfactory create sqltaskexecutionfactory java 83 at com facebook presto execution sqltask updatetask sqltask java 350 at com facebook presto execution sqltaskmanager updatetask sqltaskmanager java 324 at com facebook presto server taskresource createorupdatetask taskresource java 129 at sun reflect generatedmethodaccessor502 invoke unknown source at sun reflect delegatingmethodaccessorimpl invoke delegatingmethodaccessorimpl java 43 at java lang reflect method invoke method java 498 at org glassfish jersey server model internal resourcemethodinvocationhandlerfactory lambda static 0 resourcemethodinvocationhandlerfactory java 76 at org glassfish jersey server model internal abstractjavaresourcemethoddispatcher 1 run abstractjavaresourcemethoddispatcher java 148 at org glassfish jersey server model internal abstractjavaresourcemethoddispatcher invoke abstractjavaresourcemethoddispatcher java 191 at org glassfish jersey server model internal javaresourcemethoddispatcherprovider responseoutinvoker dodispatch javaresourcemethoddispatcherprovider java 200 at org glassfish jersey server model internal abstractjavaresourcemethoddispatcher dispatch abstractjavaresourcemethoddispatcher java 103 at org glassfish jersey server model resourcemethodinvoker invoke resourcemethodinvoker java 493 at org glassfish jersey server model resourcemethodinvoker apply resourcemethodinvoker java 415 at org glassfish jersey server model resourcemethodinvoker apply resourcemethodinvoker java 104 at org glassfish jersey server serverruntime 1 run serverruntime java 277 at org glassfish jersey internal error 1 call error java 272 at org glassfish jersey internal error 1 call error java 268 at org glassfish jersey internal error process error java 316 at org glassfish jersey internal error process error java 298 at org glassfish jersey internal error process error java 268 at org glassfish jersey process internal requestscope runinscope requestscope java 289 at org glassfish jersey server serverruntime process serverruntime java 256 at org glassfish jersey server applicationhandler handle applicationhandler java 703 at org glassfish jersey servlet webcomponent serviceimpl webcomponent java 416 at org glassfish jersey servlet webcomponent service webcomponent java 370 at org glassfish jersey servlet servletcontainer service servletcontainer java 389 at org glassfish jersey servlet servletcontainer service servletcontainer java 342 at org glassfish jersey servlet servletcontainer service servletcontainer java 229 at org eclipse jetty servlet servletholder handle servletholder java 860 at org eclipse jetty servlet servlethandler cachedchain dofilter servlethandler java 1650 at com facebook presto server security authenticationfilter dofilter authenticationfilter java 69 at org eclipse jetty servlet servlethandler cachedchain dofilter servlethandler java 1637 at io airlift http server tracetokenfilter dofilter tracetokenfilter java 64 at org eclipse jetty servlet servlethandler cachedchain dofilter servlethandler java 1637 at io airlift http server timingfilter dofilter timingfilter java 52 at org eclipse jetty servlet servlethandler cachedchain dofilter servlethandler java 1637 at org eclipse jetty servlet servlethandler dohandle servlethandler java 533 at org eclipse jetty server handler scopedhandler handle scopedhandler java 143 at org eclipse jetty server handler gzip gziphandler handle gziphandler java 455 at org eclipse jetty server handler handlerwrapper handle handlerwrapper java 132 at org eclipse jetty server handler scopedhandler nexthandle scopedhandler java 190 at org eclipse jetty server handler contexthandler dohandle contexthandler java 1253 at org eclipse jetty server handler scopedhandler nextscope scopedhandler java 168 at org eclipse jetty servlet servlethandler doscope servlethandler java 473 at org eclipse jetty server handler scopedhandler nextscope scopedhandler java 166 at org eclipse jetty server handler contexthandler doscope contexthandler java 1155 at org eclipse jetty server handler scopedhandler handle scopedhandler java 141 at org eclipse jetty server handler handlercollection handle handlercollection java 126 at org eclipse jetty server handler statisticshandler handle statisticshandler java 169 at org eclipse jetty server handler handlerlist handle handlerlist java 61 at org eclipse jetty server handler handlerwrapper handle handlerwrapper java 132 at org eclipse jetty server server handle server java 530 at org eclipse jetty server httpchannel handle httpchannel java 347 at org eclipse jetty server httpconnection onfillable httpconnection java 256 at org eclipse jetty io abstractconnection readcallback succeed abstractconnection java 279 at org eclipse jetty io fillinterest fillable fillinterest java 102 at org eclipse jetty io channelendpoint 2 run channelendpoint java 124 at org eclipse jetty util thread strategy eatwhatyoukill doproduce eatwhatyoukill java 247 at org eclipse jetty util thread strategy eatwhatyoukill produce eatwhatyoukill java 140 at org eclipse jetty util thread strategy eatwhatyoukill run eatwhatyoukill java 131 at org eclipse jetty util thread reservedthreadexecutor reservedthread run reservedthreadexecutor java 382 at org eclipse jetty util thread queuedthreadpool runjob queuedthreadpool java 708 at org eclipse jetty util thread queuedthreadpool 2 run queuedthreadpool java 626 at java lang thread run thread java 748 here be step to reproduce the error create table customer email varchar companyid int with format parquet partition by array companyid create table order email varchar companyid int with format parquet partition by array companyid insert into customer value 1234 select from customer c leave join order o on c companyid o companyid and c email o email where c companyid 1234 thank for your time |
prestodbpresto | query fail with build execution be group execution probe execution be expect be group execution but be ungrouped execution | Bug | haozhun be work on a fix for this issue java sql sqlexception query fail 20180417 034948 02872 dfg6z build execution be group execution probe execution be expect be group execution but be ungrouped execution at com facebook presto jdbc prestoresultset resultsexception prestoresultset java 1798 at com facebook presto jdbc prestoresultset resultspageiterator computenext prestoresultset java 1786 at com facebook presto jdbc prestoresultset resultspageiterator computenext prestoresultset java 1751 at com facebook presto jdbc internal guava collect abstractiterator trytocomputenext abstractiterator java 141 at com facebook presto jdbc internal guava collect abstractiterator hasnext abstractiterator java 136 at com facebook presto jdbc internal guava collect transformediterator hasnext transformediterator java 42 at com facebook presto jdbc internal guava collect iterators concatenatediterator gettopmetaiterator iterator java 1319 at com facebook presto jdbc internal guava collect iterators concatenatediterator hasnext iterator java 1335 at com facebook presto jdbc prestoresultset next prestoresultset java 142 at com facebook presto verifier validator convertjdbcresultset validator java 513 at sun reflect generatedmethodaccessor19 invoke unknown source at sun reflect delegatingmethodaccessorimpl invoke delegatingmethodaccessorimpl java 43 at java lang reflect method invoke method java 498 at com google common util concurrent simpletimelimiter 1 1 call simpletimelimiter java 95 at java util concurrent futuretask run futuretask java 266 at java util concurrent threadpoolexecutor runworker threadpoolexecutor java 1149 at java util concurrent threadpoolexecutor worker run threadpoolexecutor java 624 at java lang thread run thread java 748 at java util concurrent futuretask report futuretask java 122 at java util concurrent futuretask get futuretask java 206 at com google common util concurrent uninterruptible getuninterruptibly uninterruptible java 238 at com google common util concurrent simpletimelimiter callwithtimeout simpletimelimiter java 135 at com google common util concurrent simpletimelimiter access 100 simpletimelimiter java 48 at com google common util concurrent simpletimelimiter 1 invoke simpletimelimiter java 101 at com sun proxy proxy86 convert unknown source at com facebook presto verifier validator executequery validator java 439 at com facebook presto verifier validator executequeryt validator java 308 at com facebook presto verifier validator validate validator java 219 at com facebook presto verifier validator valid validator java 191 at java util concurrent executors runnableadapter call executor java 511 at java util concurrent futuretask run futuretask java 266 at java util concurrent executors runnableadapter call executor java 511 at java util concurrent futuretask run futuretask java 266 at java util concurrent threadpoolexecutor runworker threadpoolexecutor java 1149 at java util concurrent threadpoolexecutor worker run threadpoolexecutor java 624 at java lang thread run thread java 748 cause by java lang illegalstateexception build execution be group execution probe execution be expect be group execution but be ungrouped execution at com google common base precondition checkstate precondition java 504 at com facebook presto sql planner localexecutionplanner visitor createlookupsourcefactory localexecutionplanner java 1846 at com facebook presto sql planner localexecutionplanner visitor createlookupjoin localexecutionplanner java 1820 at com facebook presto sql planner localexecutionplanner visitor visitjoin localexecutionplanner java 1526 at com facebook presto sql planner localexecutionplanner visitor visitjoin localexecutionplanner java 646 at com facebook presto sql planner plan joinnode accept joinnode java 279 at com facebook presto sql planner localexecutionplanner visitor createlookupjoin localexecutionplanner java 1816 at com facebook presto sql planner localexecutionplanner visitor visitjoin localexecutionplanner java 1526 at com facebook presto sql planner localexecutionplanner visitor visitjoin localexecutionplanner java 646 at com facebook presto sql planner plan joinnode accept joinnode java 279 at com facebook presto sql planner localexecutionplanner visitor visitscanfilterandproject localexecutionplanner java 1115 at com facebook presto sql planner localexecutionplanner visitor visitproject localexecutionplanner java 1075 at com facebook presto sql planner localexecutionplanner visitor visitproject localexecutionplanner java 646 at com facebook presto sql planner plan projectnode accept projectnode java 92 at com facebook presto sql planner localexecutionplanner visitor visitscanfilterandproject localexecutionplanner java 1115 at com facebook presto sql planner localexecutionplanner visitor visitproject localexecutionplanner java 1075 at com facebook presto sql planner localexecutionplanner visitor visitproject localexecutionplanner java 646 at com facebook presto sql planner plan projectnode accept projectnode java 92 at com facebook presto sql planner localexecutionplanner visitor visitaggregation localexecutionplanner java 1014 at com facebook presto sql planner localexecutionplanner visitor visitaggregation localexecutionplanner java 646 at com facebook presto sql planner plan aggregationnode accept aggregationnode java 182 at com facebook presto sql planner localexecutionplanner plan localexecutionplanner java 425 at com facebook presto sql planner localexecutionplanner plan localexecutionplanner java 396 at com facebook presto execution sqltaskexecutionfactory create sqltaskexecutionfactory java 83 at com facebook presto execution sqltask updatetask sqltask java 350 at com facebook presto execution sqltaskmanager updatetask sqltaskmanager java 324 at com facebook presto server taskresource createorupdatetask taskresource java 129 at jdk internal reflect generatedmethodaccessor732 invoke unknown source at java base jdk internal reflect delegatingmethodaccessorimpl invoke delegatingmethodaccessorimpl java 43 at java base java lang reflect method invoke method java 564 at org glassfish jersey server model internal resourcemethodinvocationhandlerfactory lambda static 0 resourcemethodinvocationhandlerfactory java 76 at org glassfish jersey server model internal abstractjavaresourcemethoddispatcher 1 run abstractjavaresourcemethoddispatcher java 148 at org glassfish jersey server model internal abstractjavaresourcemethoddispatcher invoke abstractjavaresourcemethoddispatcher java 191 at org glassfish jersey server model internal javaresourcemethoddispatcherprovider responseoutinvoker dodispatch javaresourcemethoddispatcherprovider java 200 at org glassfish jersey server model internal abstractjavaresourcemethoddispatcher dispatch abstractjavaresourcemethoddispatcher java 103 at org glassfish jersey server model resourcemethodinvoker invoke resourcemethodinvoker java 493 at org glassfish jersey server model resourcemethodinvoker apply resourcemethodinvoker java 415 at org glassfish jersey server model resourcemethodinvoker apply resourcemethodinvoker java 104 at org glassfish jersey server serverruntime 1 run serverruntime java 277 at org glassfish jersey internal error 1 call error java 272 at org glassfish jersey internal error 1 call error java 268 at org glassfish jersey internal error process error java 316 at org glassfish jersey internal error process error java 298 at org glassfish jersey internal error process error java 268 at org glassfish jersey process internal requestscope runinscope requestscope java 289 at org glassfish jersey server serverruntime process serverruntime java 256 at org glassfish jersey server applicationhandler handle applicationhandler java 703 at org glassfish jersey servlet webcomponent serviceimpl webcomponent java 416 at org glassfish jersey servlet webcomponent service webcomponent java 370 at org glassfish jersey servlet servletcontainer service servletcontainer java 389 at org glassfish jersey servlet servletcontainer service servletcontainer java 342 at org glassfish jersey servlet servletcontainer service servletcontainer java 229 at org eclipse jetty servlet servletholder handle servletholder java 860 at org eclipse jetty servlet servlethandler cachedchain dofilter servlethandler java 1650 at com facebook presto server security authenticationfilter dofilter authenticationfilter java 69 at org eclipse jetty servlet servlethandler cachedchain dofilter servlethandler java 1637 at io airlift http server tracetokenfilter dofilter tracetokenfilter java 64 at org eclipse jetty servlet servlethandler cachedchain dofilter servlethandler java 1637 at io airlift http server timingfilter dofilter timingfilter java 52 at org eclipse jetty servlet servlethandler cachedchain dofilter servlethandler java 1637 at org eclipse jetty servlet servlethandler dohandle servlethandler java 533 at org eclipse jetty server handler scopedhandler handle scopedhandler java 143 at org eclipse jetty server handler gzip gziphandler handle gziphandler java 455 at org eclipse jetty server handler handlerwrapper handle handlerwrapper java 132 at org eclipse jetty server handler scopedhandler nexthandle scopedhandler java 190 at org eclipse jetty server handler contexthandler dohandle contexthandler java 1253 at org eclipse jetty server handler scopedhandler nextscope scopedhandler java 168 at org eclipse jetty servlet servlethandler doscope servlethandler java 473 at org eclipse jetty server handler scopedhandler nextscope scopedhandler java 166 at org eclipse jetty server handler contexthandler doscope contexthandler java 1155 at org eclipse jetty server handler scopedhandler handle scopedhandler java 141 at org eclipse jetty server handler handlercollection handle handlercollection java 126 at org eclipse jetty server handler statisticshandler handle statisticshandler java 169 at org eclipse jetty server handler handlerlist handle handlerlist java 61 at org eclipse jetty server handler handlerwrapper handle handlerwrapper java 132 at org eclipse jetty server server handle server java 530 at org eclipse jetty server httpchannel handle httpchannel java 347 at org eclipse jetty server httpconnection onfillable httpconnection java 256 at org eclipse jetty io abstractconnection readcallback succeed abstractconnection java 279 at org eclipse jetty io fillinterest fillable fillinterest java 102 at org eclipse jetty io channelendpoint 2 run channelendpoint java 124 at org eclipse jetty util thread strategy eatwhatyoukill doproduce eatwhatyoukill java 247 at org eclipse jetty util thread strategy eatwhatyoukill produce eatwhatyoukill java 140 at org eclipse jetty util thread strategy eatwhatyoukill run eatwhatyoukill java 131 at org eclipse jetty util thread reservedthreadexecutor reservedthread run reservedthreadexecutor java 382 at org eclipse jetty util thread queuedthreadpool runjob queuedthreadpool java 708 at org eclipse jetty util thread queuedthreadpool 2 run queuedthreadpool java 626 at java base java lang thread run thread java 844 |
prestodbpresto | presto throw exception for all query on partition hive table with float datum type if column statistic be calculate and partition column be not specify as a filter | Bug | consider the following hive table creation insert script create table test mgrs varchar 11 testval float partition by part digit tinyint row format delimit field terminate by store as textfile insert into test partition part digit 1 value 16reu833621 0 0 insert into test partition part digit 2 value 11slt745622 14 20005 we can now run the follow command in presto cli show stat for hive default test column name datum size distinct value count null fraction row count low value high value mgrs null null null null null null part digit null 2 0 0 0 null 1 2 testval null null null null null null null null null null 2 0 null null select from hive default test mgrs testval part digit 11slt745622 14 20005 2 16reu833621 0 0 1 2 row but if we go back to hive and calculate column statistic on the table analyze table test partition part digit compute statistic analyze table test partition part digit compute statistic for column then we get an error when interact with the table in presto unless we specify the partition show stat for test query 20180409 200805 00073 m7qye fail object 0 do not match type long select from hive default test query 20180409 195322 00069 m7qye fail object 0 do not match type long select from hive default test where part digit 1 mgrs testval part digit 16reu833621 0 0 1 1 row however we can go back and change the column type to double in hive alter table test change column testval testval double and now the presto query work again select from hive default test mgrs testval part digit 11slt745622 14 20005 2 16reu833621 0 0 1 2 row here be the full stack trace of the object 0 do not match type long exception java lang illegalargumentexception object 0 do not match type long at com facebook presto spi predicate util nativevaluetoblock util java 33 at com facebook presto hive statistics metastorehivestatisticsprovider lambda gettablestatistic 9 metastorehivestatisticsprovider java 163 at java util function binaryoperator lambda minby 0 binaryoperator java 59 at java util stream reduceop 2reducingsink accept reduceop java 123 at java util spliterator arrayspliterator foreachremaine spliterator java 948 at java util stream abstractpipeline copyinto abstractpipeline java 481 at java util stream abstractpipeline wrapandcopyinto abstractpipeline java 471 at java util stream reduceop reduceop evaluatesequential reduceop java 708 at java util stream abstractpipeline evaluate abstractpipeline java 234 at java util stream referencepipeline reduce referencepipeline java 479 at java util stream referencepipeline min referencepipeline java 520 at com facebook presto hive statistics metastorehivestatisticsprovider gettablestatistic metastorehivestatisticsprovider java 167 at com facebook presto hive hivemetadata gettablestatistics hivemetadata java 401 at com facebook presto spi connector classloader classloadersafeconnectormetadata gettablestatistic classloadersafeconnectormetadata java 176 at com facebook presto metadata metadatamanager gettablestatistics metadatamanager java 368 at com facebook presto cost coefficientbasedstatscalculator visitor visittablescan coefficientbasedstatscalculator java 154 at com facebook presto cost coefficientbasedstatscalculator visitor visittablescan coefficientbasedstatscalculator java 75 at com facebook presto sql planner plan tablescannode accept tablescannode java 136 at com facebook presto cost coefficientbasedstatscalculator calculatestat coefficientbasedstatscalculator java 72 at com facebook presto cost selectingstatscalculator calculatestat selectingstatscalculator java 55 at com facebook presto cost cachingstatsprovider getstat cachingstatsprovider java 73 at com facebook presto sql planner planprinter planprinter visitor isknownplannodestatsorcost planprinter java 1386 at java util stream matchop 1matchsink accept matchop java 90 at java util spliterators arrayspliterator tryadvance spliterator java 958 at java util stream referencepipeline foreachwithcancel referencepipeline java 126 at java util stream abstractpipeline copyintowithcancel abstractpipeline java 498 at java util stream abstractpipeline copyinto abstractpipeline java 485 at java util stream abstractpipeline wrapandcopyinto abstractpipeline java 471 at java util stream matchop matchop evaluatesequential matchop java 230 at java util stream matchop matchop evaluatesequential matchop java 196 at java util stream abstractpipeline evaluate abstractpipeline java 234 at java util stream referencepipeline anymatch referencepipeline java 449 at com facebook presto sql planner planprinter planprinter visitor printplannodesstatsandcost planprinter java 1376 at com facebook presto sql planner planprinter planprinter visitor visittablescan planprinter java 907 at com facebook presto sql planner planprinter planprinter visitor visittablescan planprinter java 592 at com facebook presto sql planner plan tablescannode accept tablescannode java 136 at com facebook presto sql planner planprinter planprinter planprinter java 208 at com facebook presto sql planner planprinter planprinter planprinter java 177 at com facebook presto sql planner planprinter planprinter planprinter java 164 at com facebook presto sql planner planprinter planprinter textlogicalplan planprinter java 260 at com facebook presto sql planner planprinter planprinter formatfragment planprinter java 368 at com facebook presto sql planner planprinter planprinter textplanfragment planprinter java 304 at com facebook presto sql analyzer queryexplainer getplan queryexplainer java 124 at com facebook presto execution planflattener flattenedplanfragment fromplanfragment planflattener java 97 at com facebook presto execution planflattener lambda flatten 0 planflattener java 67 at java util stream referencepipeline 3 1 accept referencepipeline java 193 at java util spliterator arrayspliterator foreachremaine spliterator java 948 at java util stream abstractpipeline copyinto abstractpipeline java 481 at java util stream abstractpipeline wrapandcopyinto abstractpipeline java 471 at java util stream reduceop reduceop evaluatesequential reduceop java 708 at java util stream abstractpipeline evaluate abstractpipeline java 234 at java util stream referencepipeline collect referencepipeline java 499 at com facebook presto execution planflattener flatten planflattener java 68 at com facebook presto execution sqlqueryexecution doanalyzequery sqlqueryexecution java 377 at com facebook presto execution sqlqueryexecution analyzequery sqlqueryexecution java 343 at com facebook presto execution sqlqueryexecution start sqlqueryexecution java 275 at com facebook presto execution queuedexecution lambda start 1 queuedexecution java 62 at java util concurrent threadpoolexecutor runworker threadpoolexecutor java 1149 at java util concurrent threadpoolexecutor worker run threadpoolexecutor java 624 at java lang thread run thread java 748 thank you |
prestodbpresto | long explain fail with timeout | Bug | presto default explain select count from information schema column where table schema like schema 0 and table name like table 0 error running command java net sockettimeoutexception timeout ui show that above query complete successfully while no result and failure in cli while presto default select count from information schema column where table schema like schema 0 and table name like table 0 col0 100 1 row query 20180409 062103 02012 52q52 finish 1 node split 18 total 18 do 100 00 0 45 100 row 2 44 kb 2 row s 55b s |
prestodbpresto | hash value calculate and shuffle but not use by subsequent stage for aggregation | Bug | in the follow plan hashvalue 10 be create in fragment2 as the hash value for interface then this value be shuffle and fragment1 be get it as hashvalue 9 but then this value be not use but instead a new hashvalue hashvalue be create on interface this increase the amount of datum shuffle over the network waste buffer explain type distribute select custkey count from order group by custkey fragment 0 single output layout custkey count output partition single execution flow ungrouped execution output custkey col1 custkey bigint count bigint col1 count remotesource 1 custkey bigint count bigint fragment 1 hash output layout custkey count output partition single execution flow ungrouped execution aggregate final custkey custkey bigint count bigint count count count 8 localexchange hash hashvalue custkey custkey bigint count 8 bigint hashvalue bigint remotesource 2 custkey bigint count 8 bigint hashvalue 9 bigint fragment 2 tpch order 15000 output layout custkey count 8 hashvalue 10 output partition hash custkey hashvalue 10 execution flow ungrouped execution project custkey bigint count 8 bigint hashvalue 10 bigint cost row cpu memory network 0 00 hashvalue 10 combine hash bigint 0 coalesce operator hash code custkey 0 aggregate partial custkey custkey bigint count 8 bigint cost row cpu 300000 00 memory network 0 00 count 8 count tablescan tpch tpch order sf0 01 originalconstraint true custkey bigint cost row 15000 146 48 kb cpu 150000 00 memory 0 00 network 0 00 custkey tpch custkey tpch orderstatus f o p |
prestodbpresto | nullpointerexception in partitionedlookupsourcefactory when use group execution and spill | Bug | 2018 03 26 14 28 36 severe error processing split 20180326 084335 00012 gv34z 1 0 31 start 5 97478603262188e8 wall 107 ms cpu 0 ms wait 116 ms call 2 java lang nullpointerexception at com facebook presto operator partitionedlookupsourcefactory spillawarelookupsourceprovider lambda withlease 0 partitionedlookupsourcefactory java 430 at java util concurrent concurrenthashmap computeifabsent concurrenthashmap java 1660 at com facebook presto operator partitionedlookupsourcefactory spillawarelookupsourceprovider withlease partitionedlookupsourcefactory java 430 at com facebook presto operator lookupjoinoperator tryfetchlookupsourceprovider lookupjoinoperator java 236 at com facebook presto operator lookupjoinoperator addinput lookupjoinoperator java 204 at com facebook presto operator driver processinternal driver java 385 at com facebook presto operator driver lambda processfor 8 driver java 278 at com facebook presto operator driver trywithlock driver java 645 at com facebook presto operator driver processfor driver java 272 at com facebook presto execution sqltaskexecution driversplitrunner processfor sqltaskexecution java 975 at com facebook presto execution executor prioritizedsplitrunner process prioritizedsplitrunner java 162 at com facebook presto execution executor taskexecutor taskrunner run taskexecutor java 492 at java util concurrent threadpoolexecutor runworker threadpoolexecutor java 1149 at java util concurrent threadpoolexecutor worker run threadpoolexecutor java 624 at java lang thread run thread java 748 this be similar to but distinct from repro step 1 run com facebook presto hive testhiveintegrationsmoketest testgroupedjoin 2 apply first the following to enable and enforce spill diff diff git presto hive src test java com facebook presto hive testhiveintegrationsmoketest java presto hive src test java com facebook presto hive testhiveintegrationsmoketest java index 0acceeca42 b8060afb6f 100644 presto hive src test java com facebook presto hive testhiveintegrationsmoketest java presto hive src test java com facebook presto hive testhiveintegrationsmoketest java 47 6 47 7 import java util function function import static com facebook presto systemsessionpropertie colocate join import static com facebook presto systemsessionpropertie concurrent lifespan per node import static com facebook presto systemsessionpropertie spill enable import static com facebook presto hive hivecolumnhandle bucket column name import static com facebook presto hive hivecolumnhandle path column name import static com facebook presto hive hivequeryrunner hive catalog 2009 16 2010 19 public class testhiveintegrationsmoketest not group execution default session notcolocate session builder getsession setsystemproperty colocate join false setsystemproperty spill enable true build co locate join with all group at once session colocatedallgroupsatonce session builder getsession setsystemproperty colocate join true setsystemproperty concurrent lifespan per node 1 setsystemproperty spill enable true build co locate join 1 group per worker at a time session colocatedonegroupatatime session builder getsession setsystemproperty colocate join true setsystemproperty concurrent lifespan per node 1 setsystemproperty spill enable true build assertquery notcolocate jointhreebucketedtable expectedquery diff git presto main src main java com facebook presto sql analyzer featuresconfig java presto main src main java com facebook presto sql analyzer featuresconfig java index 971f3d39ef 1272906945 100644 presto main src main java com facebook presto sql analyzer featuresconfig java presto main src main java com facebook presto sql analyzer featuresconfig java 86 14 86 14 public class featuresconfig private histogramgroupimplementation histogramgroupimplementation histogramgroupimplementation new private boolean spillenable private datasize aggregationoperatorunspillmemorylimit new datasize 4 datasize unit megabyte private list spillerspillpath immutablelist of private list spillerspillpath immutablelist of path get tmp spill private int spillerthread 4 private double spillmaxusedspacethreshold 0 9 private boolean iterativeoptimizerenable true private boolean enablenewstatscalculator private boolean pushaggregationthroughjoin true private double memoryrevokingtarget 0 5 private double memoryrevokingthreshold 0 9 private double memoryrevokingtarget 0 0000001 2 private double memoryrevokingthreshold 0 0000001 private boolean parsedecimalliteralsasdouble private duration iterativeoptimizertimeout new duration 3 minute by default let optimizer wait a long time in case it retrieve some datum from connectormetadata cc haozhun |
prestodbpresto | disallow create hive table with unsupported partition type | Bug | presto create table test part with partition by array a as select 123 x array foo a create table 1 row presto select from test part query 20180323 212832 42185 mpcaa fail unsupported type array varchar for partition a 5bfoo 5d |
prestodbpresto | nullpointerexception in partitionedlookupsourcefactory | Bug | java lang nullpointerexception at index 0 at com google common collect objectarray checkelementnotnull objectarray java 236 at com google common collect objectarray checkelementsnotnull objectarray java 226 at com google common collect objectarray checkelementsnotnull objectarray java 220 at com google common collect immutablelist copyof immutablelist java 291 at com facebook presto operator partitionedlookupsourcefactory supplylookupsource partitionedlookupsourcefactory java 260 at com facebook presto operator partitionedlookupsourcefactory lendpartitionlookupsource partitionedlookupsourcefactory java 189 at com facebook presto operator hashbuilderoperator finishinput hashbuilderoperator java 509 at com facebook presto operator hashbuilderoperator finish hashbuilderoperator java 458 at com facebook presto operator driver processinternal driver java 399 at com facebook presto operator driver lambda processfor 8 driver java 278 at com facebook presto operator driver trywithlock driver java 645 at com facebook presto operator driver processfor driver java 272 at com facebook presto execution sqltaskexecution driversplitrunner processfor sqltaskexecution java 975 at com facebook presto execution executor prioritizedsplitrunner process prioritizedsplitrunner java 162 at com facebook presto execution executor taskexecutor taskrunner run taskexecutor java 492 at java base java util concurrent threadpoolexecutor runworker threadpoolexecutor java 1167 at java base java util concurrent threadpoolexecutor worker run threadpoolexecutor java 641 at java base java lang thread run thread java 844 |
prestodbpresto | add memory usage to presto cli output | Enhancement | currently we only show the info below it would be nice to also show the memory usage query 20180322 180238 86459 7bwvd run 187 node 7 909 split split 0 queue 2 404 run 5 505 do cpu time 33046 5s total 190k rows s 2 8 mb s 73 active per node 11 2 parallelism 2 13 m rows s 31 3 mb s parallelism 2092 5 0 16 6 29b row 90 4 gb 398 m rows s 5 72 gb s 69 |
prestodbpresto | query kill button be not work | Bug | with the late release I try kill several query with the kill button in the query detail page and it doesn t work |
prestodbpresto | improve rewrite of exist subquery with single equality conjunct | Enhancement | currently query with exist with single equality conjunct like select o orderkey from order where exist select 1 from nation where o orderkey n nationkey be rewrite to plan contain count aggregation and leave join e g presto sf1 explain select o orderkey from order where exist select 1 from nation where o orderkey n nationkey query plan output o orderkey o orderkey bigint remoteexchange gather o orderkey bigint filterproject filterpredicate coalesce count count 11 bigint 0 o orderkey bigint crossjoin o orderkey bigint count bigint count 11 bigint distribution replicate leftjoin o orderkey n nationkey hashvalue hashvalue 13 o orderkey bigint count bigint distribution partition scanproject table tpch tpch order sf1 0 originalconstraint true o orderkey bigint hashvalue bigint cost row 1500000 14 31 mb cpu 15000000 00 memory 0 00 network 0 00 row 1500000 28 61 mb cpu 45000000 00 memory 0 00 network 0 00 hashvalue combine hash bigint 0 coalesce operator hash code o orderkey 0 o orderkey tpch o orderkey tpch o orderstatus f o p localexchange hash hashvalue 13 n nationkey n nationkey bigint count bigint hashvalue 13 bigint remoteexchange repartition n nationkey bigint count bigint hashvalue 14 bigint project n nationkey bigint count bigint hashvalue 18 bigint hashvalue 18 combine hash bigint 0 coalesce operator hash code n nationkey 0 aggregate final n nationkey n nationkey bigint count bigint count count count 12 localexchange hash hashvalue 15 n nationkey n nationkey bigint count 12 bigint hashvalue 15 bigint remoteexchange repartition hashvalue 16 n nationkey bigint count 12 bigint hashvalue 16 bigint project n nationkey bigint count 12 bigint hashvalue 17 bigint cost row cpu memory network 0 00 hashvalue 17 combine hash bigint 0 coalesce operator hash code n nationkey 0 aggregate partial n nationkey n nationkey bigint count 12 bigint cost row cpu 500 00 memory network 0 00 count 12 count tablescan tpch tpch nation sf1 0 originalconstraint true n nationkey bigint cost row 25 250b cpu 250 00 memory 0 00 network 0 00 n nationkey tpch n nationkey localexchange single count 11 bigint cost row cpu 10 00 memory network remoteexchange replicate count 11 bigint cost row cpu 10 00 memory network aggregate count 11 bigint cost row cpu 10 00 memory network 0 00 count 11 count expr 10 value expr 10 boolean cost row 1 10b cpu 0 00 memory 0 00 network 0 00 null simple and probably more performant rewrite would facilitate semi join so rewrite plan be equivalent to plan for query select o orderkey from order where o orderkey in select n nationkey from nation cc findepi sopel39 kokose |
prestodbpresto | plan failure for multiple aggregate with same distinct input | Bug | sql select count distinct x sum distinct x from value 1 1 2 3 t x fail with query 20180314 001708 00128 g7z3n fail invalid node aggregation dependency x 1 not in source plan output field hashvalue java lang illegalargumentexception invalid node aggregation dependency x 1 not in source plan output field hashvalue at com google common base precondition checkargument precondition java 146 at com facebook presto sql planner sanity validatedependencieschecker checkdependencie validatedependencieschecker java 613 at com facebook presto sql planner sanity validatedependencieschecker access 100 validatedependencieschecker java 79 at com facebook presto sql planner sanity validatedependencieschecker visitor visitaggregation validatedependencieschecker java 122 at com facebook presto sql planner sanity validatedependencieschecker visitor visitaggregation validatedependencieschecker java 93 at com facebook presto sql planner plan aggregationnode accept aggregationnode java 182 at com facebook presto sql planner sanity validatedependencieschecker visitor visitexchange validatedependencieschecker java 465 at com facebook presto sql planner sanity validatedependencieschecker visitor visitexchange validatedependencieschecker java 93 at com facebook presto sql planner plan exchangenode accept exchangenode java 196 at com facebook presto sql planner sanity validatedependencieschecker visitor visitaggregation validatedependencieschecker java 115 at com facebook presto sql planner sanity validatedependencieschecker visitor visitaggregation validatedependencieschecker java 93 at com facebook presto sql planner plan aggregationnode accept aggregationnode java 182 at com facebook presto sql planner sanity validatedependencieschecker visitor visitoutput validatedependencieschecker java 292 at com facebook presto sql planner sanity validatedependencieschecker visitor visitoutput validatedependencieschecker java 93 at com facebook presto sql planner plan outputnode accept outputnode java 82 at com facebook presto sql planner sanity validatedependencieschecker validate validatedependencieschecker java 90 at com facebook presto sql planner sanity validatedependencieschecker validate validatedependencieschecker java 85 at com facebook presto sql planner sanity plansanitychecker lambda validatefinalplan 0 plansanitychecker java 54 at com google common collect immutablelist foreach immutablelist java 408 at com facebook presto sql planner sanity plansanitychecker validatefinalplan plansanitychecker java 54 at com facebook presto sql planner logicalplanner plan logicalplanner java 133 at com facebook presto sql planner logicalplanner plan logicalplanner java 115 at com facebook presto execution sqlqueryexecution doanalyzequery sqlqueryexecution java 364 at com facebook presto execution sqlqueryexecution analyzequery sqlqueryexecution java 343 at com facebook presto execution sqlqueryexecution start sqlqueryexecution java 275 at java util concurrent threadpoolexecutor runworker threadpoolexecutor java 1149 at java util concurrent threadpoolexecutor worker run threadpoolexecutor java 624 at java lang thread run thread java 748 |
prestodbpresto | querymanager be report runningquerie wrong | Bug | runningquerie from querymanager be 450 500 sometimes while the runningquerie counter from the resource group be just 40 50 |
prestodbpresto | planning fail for query with non deterministic predicate pushdownable to semi join source | Bug | example query select from lineitem where orderkey not in select orderkey from order and orderkey random 5 fail with java lang illegalargumentexception only deterministic expression may be consider for rewrite at com google common base precondition checkargument precondition java 122 at com facebook presto sql planner equalityinference rewriteexpression equalityinference java 106 at com facebook presto sql planner optimization predicatepushdown rewriter visitsemijoin predicatepushdown java 811 at com facebook presto sql planner optimization predicatepushdown rewriter visitsemijoin predicatepushdown java 115 at com facebook presto sql planner plan semijoinnode accept semijoinnode java 139 at com facebook presto sql planner plan simpleplanrewriter rewritecontext rewrite simpleplanrewriter java 84 at com facebook presto sql planner optimization predicatepushdown rewriter visitfilter predicatepushdown java 275 at com facebook presto sql planner optimization predicatepushdown rewriter visitfilter predicatepushdown java 115 at com facebook presto sql planner plan filternode accept filternode java 72 at com facebook presto sql planner plan simpleplanrewriter rewritecontext rewrite simpleplanrewriter java 84 at com facebook presto sql planner plan simpleplanrewriter rewritecontext lambda defaultrewrite 0 simpleplanrewriter java 73 at java util stream referencepipeline 3 1 accept referencepipeline java 193 this happen when predicatepushdown try to push down orderkey random 5 to semi join source responsible for scan lineitem table it seem like a valid pushdown as semi join do not create copy of row from the source side |
prestodbpresto | presto doesn t remove column from plan which can be conclude to be literal | Enhancement | presto explain select y from select x from value 3 t x where x 3 select y from value 3 t y where x y query plan output y field 4 integer cost row 1 10b cpu 200 00 memory 80 00 network 0 00 y field 4 crossjoin field 4 integer distribution replicate cost row 1 10b cpu 200 00 memory 80 00 network 0 00 filterproject filterpredicate field 3 cost row 1 10b cpu 20 00 memory 0 00 network 0 00 row 1 0b cpu 20 00 memory 0 00 network 0 00 localexchange round robin field integer cost row 1 10b cpu 10 00 memory 0 00 network 0 00 value field integer cost row 1 10b cpu 0 00 memory 0 00 network 0 00 3 localexchange single field 4 integer cost row 1 10b cpu 20 00 memory 0 00 network 0 00 filter filterpredicate 3 field 4 field 4 integer cost row 1 10b cpu 20 00 memory 0 00 network 0 00 localexchange round robin field 4 integer cost row 1 10b cpu 10 00 memory 0 00 network 0 00 value field 4 integer cost row 1 10b cpu 0 00 memory 0 00 network 0 00 3 in this case we can conclude that field 4 3 therefore we could just remove the symbol completely above filter filterpredicate 3 field 4 field 4 integer probably we need a rule that base on effective predicate watch out for null would try to simplify expression by rewrite they without usage of symbol one by one fyi martint findepi |
prestodbpresto | memory leak operatorcontext hold reference to driver and operator after driver be close | Bug | operatorcontext memoryrevocationrequestlistener come from lambda from driver operatorcontext be keep for some time after sql task be finish however since memoryrevocationrequestlistener isn t reset actual operator and all structure they have be keep too |
prestodbpresto | reset resetmemoryrevocationrequestlistener when driver be close | Bug | resetmemoryrevocationrequestlistener should be reset on driver close otherwise operatorcontext hold reference to driver and operator instance thus consume memory |
prestodbpresto | incorrect return value for round n with negative n for type other than decimal | Bug | round smallint 99 1 should return 100 now it return 99 |
prestodbpresto | driver may become block when yield signal kick in | Bug | in com facebook presto operator driver processinternal there be a logic java if movedpage place1 list blockedoperator new arraylist list blockedfuture new arraylist for operator operator operator optional block getblockedfuture operator if block ispresent place2 blockedoperator add operator blockedfuture add block get if blockedfuture isempty unblock when the first future be complete listenablefuture block firstfinishedfuture blockedfuture place3 driver record serial block time drivercontext recordblocke block each block operator be responsible for block the execution until one of the operator can continue for operator operator blockedoperator operator getoperatorcontext recordblocke block return block there be two problem here problem 1 movedpage doesn t mean no progress at place1 we assume than if movedpage then we re basically block and we need to identify why however it s completely legal for operator getoutput to return null even if some progress have be eg when com facebook presto operator driveryieldsignal isset kick in this mean a driver may become block wait on some block operator higher up the pipeline eg join s probe side but it should not be this may harm parallelism and in extreme case can potentially lead to starvation when operator higher up be block on memory which be hold by operator that didn t produce a page due to eg yield signal problem 2 we evaluate isblocke twice at place2 we evaluate operator isblocke isdone second time any now unblocked operator win t be part of future list we re wait for place3 thus there be a race condition we didn t make progress because operator a be block and some other operator b be block too operator a become unblocked and so we will wait for operator b only in this case we should not wait at all it s like lose object notify call cc losipiuk sopel39 dain highker |
prestodbpresto | count on empty relation return null when optimize mix distinct aggregation be turn on | Bug | presto tiny set session optimize mix distinct aggregation true set session presto tiny select count count distinct nationkey from select from nation except select from nation col0 col1 null 0 1 row |
prestodbpresto | add rule that remove unnececery cast | Enhancement | fyi martint |
prestodbpresto | log function do not conform to sql 2016 | Bug | from section 6 30 log the current implementation have the argument reverse log value base |
prestodbpresto | explain create table as select create a table should be side effect free | Bug | presto use memory default use presto default explain create table x as select 1 c query plan output row row bigint tablecommit memory instance memoryoutputtablehandle table memorytablehandle connectorid memory schemaname default tablename x tableid 0 columnhandle localexchange single partialrow bigint fragment varbinary remoteexchange gather partialrow bigint fragment varbinary tablewriter partialrow bigint fragment varbinary c expr presto default explain create table x as select 1 c query 20180205 101139 00002 ijv9f fail line 1 9 destination table memory default x already exist elect from x c 0 row explain render query plan without actually run the query so explain create table as select should do just that currently it create the table but do t populate it |
prestodbpresto | support split to map with lambda to resolve key conflict | Enhancement | the current version of split to map would fail if there s duplicate key since the input be a string there s very little user can do about it support a second version of this function that accept a lambda function k old val new val varchar so user can specify how to resolve the key conflict for example split to map a b a d k v1 v2 v2 will keep the last value when there be duplicate key and return a d while split to map a b a d k v1 v2 v1 will keep the first value when there be deplicate key and return a b and split tp map a b a d k v1 v2 v1 v2 will sum up all value of the same key and return a bd |
prestodbpresto | race condition in outerpositiontracker | Bug | we see an error in the outerpositiontracker where the outer position iterator be be fetch while there be still reference count I think this might be cause because the query be tear down due to a limit here be the stack com google common base verifyexception at com google common base verify verify verify java 99 at com facebook presto operator partitionedlookupsource outerpositiontracker factory getouterpositioniterator partitionedlookupsource java 299 at com facebook presto operator partitionedlookupsource 1 getouterpositioniterator partitionedlookupsource java 65 at com facebook presto operator partitionedlookupsourcefactory getouterpositioniterator partitionedlookupsourcefactory java 362 at com facebook presto operator lookupjoinoperatorfactory perlifespandata lambda new 1 lookupjoinoperatorfactory java 315 at com google common util concurrent abstracttransformfuture transformfuture dotransform abstracttransformfuture java 239 at com google common util concurrent abstracttransformfuture transformfuture dotransform abstracttransformfuture java 229 at com google common util concurrent abstracttransformfuture run abstracttransformfuture java 130 at com google common util concurrent moreexecutor directexecutor execute moreexecutor java 399 at com google common util concurrent abstractfuture executelistener abstractfuture java 902 at com google common util concurrent abstractfuture complete abstractfuture java 813 at com google common util concurrent abstractfuture setfuture abstractfuture java 713 at com google common util concurrent abstracttransformfuture asynctransformfuture setresult abstracttransformfuture java 221 at com google common util concurrent abstracttransformfuture asynctransformfuture setresult abstracttransformfuture java 200 at com google common util concurrent abstracttransformfuture run abstracttransformfuture java 177 at com google common util concurrent moreexecutor directexecutor execute moreexecutor java 399 at com google common util concurrent abstractfuture executelistener abstractfuture java 902 at com google common util concurrent abstractfuture complete abstractfuture java 813 at com google common util concurrent abstractfuture set abstractfuture java 655 at com google common util concurrent settablefuture set settablefuture java 48 at com facebook presto operator referencecount release referencecount java 55 at com google common io close close close java 216 at com facebook presto operator lookupjoinoperator close lookupjoinoperator java 514 at com facebook presto operator driver destroyifnecessary driver java 496 at com facebook presto operator driver trywithlock driver java 667 at com facebook presto operator driver processfor driver java 272 at com facebook presto execution sqltaskexecution driversplitrunner processfor sqltaskexecution java 975 at com facebook presto execution executor prioritizedsplitrunner process prioritizedsplitrunner java 163 at com facebook presto execution executor legacyprioritizedsplitrunner process legacyprioritizedsplitrunner java 23 at com facebook presto execution executor taskexecutor taskrunner run taskexecutor java 492 at java util concurrent threadpoolexecutor runworker threadpoolexecutor java 1149 at java util concurrent threadpoolexecutor worker run threadpoolexecutor java 624 at java lang thread run thread java 748 |
prestodbpresto | lambda function couldn t be find in functionregistry if return type be a literal varchar | Bug | e g regexp replace abbabba abba x m doesn t work but regexp replace abbabba abba x varchar m work the error be like com facebook presto sql analyzer semanticexception unexpected parameter varchar 7 varchar 4 com facebook presto sql analyzer typesignatureprovider 6ee660fb for function regexp replace expect regexp replace varchar x re2jregexp varchar y regexp replace varchar re2jregexp function array varchar varchar regexp replace varchar x re2jregexp at com facebook presto sql analyzer expressionanalyzer resolvefunction expressionanalyzer java 1363 at com facebook presto sql analyzer expressionanalyzer visitor visitfunctioncall expressionanalyzer java 818 at com facebook presto sql analyzer expressionanalyzer visitor visitfunctioncall expressionanalyzer java 288 at com facebook presto sql tree functioncall accept functioncall java 119 at com facebook presto sql tree stackableastvisitor process stackableastvisitor java 26 at com facebook presto sql analyzer expressionanalyzer visitor process expressionanalyzer java 309 at com facebook presto sql analyzer expressionanalyzer analyze expressionanalyzer java 259 at com facebook presto sql analyzer expressionanalyzer analyzeexpression expressionanalyzer java 1485 at com facebook presto sql analyzer expressionanalyzer analyzeexpressionswithsymbol expressionanalyzer java 1438 at com facebook presto operator scalar functionassertion createexpression functionassertion java 747 at com facebook presto operator scalar functionassertion executeprojectionwithall functionassertion java 574 at com facebook presto operator scalar functionassertion selectuniquevalue functionassertion java 303 at com facebook presto operator scalar functionassertion selectsinglevalue functionassertion java 298 at com facebook presto operator scalar functionassertion assertfunction functionassertion java 261 at com facebook presto operator scalar abstracttestfunction assertfunction abstracttestfunction java 99 at com facebook presto operator scalar testregexpfunction testregexpreplacelambda testregexpfunction java 168 at sun reflect nativemethodaccessorimpl invoke0 native method at sun reflect nativemethodaccessorimpl invoke nativemethodaccessorimpl java 62 at sun reflect delegatingmethodaccessorimpl invoke delegatingmethodaccessorimpl java 43 at java lang reflect method invoke method java 498 at org testng internal methodinvocationhelper invokemethod methodinvocationhelper java 104 at org testng internal invoker invokemethod invoker java 645 at org testng internal invoker invoketestmethod invoker java 851 at org testng internal invoker invoketestmethod invoker java 1177 at org testng internal testmethodworker invoketestmethod testmethodworker java 129 at org testng internal testmethodworker run testmethodworker java 112 at org testng testrunner privaterun testrunner java 756 at org testng testrunner run testrunner java 610 at org testng suiterunner runtest suiterunner java 387 at org testng suiterunner runsequentially suiterunner java 382 at org testng suiterunner privaterun suiterunner java 340 at org testng suiterunner run suiterunner java 289 at org testng suiterunnerworker runsuite suiterunnerworker java 52 at org testng suiterunnerworker run suiterunnerworker java 86 at org testng testng runsuitessequentially testng java 1293 at org testng testng runsuiteslocally testng java 1218 at org testng testng runsuite testng java 1133 at org testng testng run testng java 1104 at org testng idearemotetestng run idearemotetestng java 72 at org testng remotetestngstarter main remotetestngstarter java 123 |
prestodbpresto | presto cli print query abort by user even for successful query | Bug | presto sf100 select count from region col0 5 1 row query 20180131 042030 00000 5bgy3 finish 4 node split 37 total 37 do 100 00 cpu time 2 3s total 2 row s 0b s 66 active per node 0 1 parallelism 0 rows s 0b s parallelism 0 6 0 04 5 row 0b 1 rows s 0b s query abort by user presto sf100 |
prestodbpresto | partial query failure recovery | Enhancement | goal reduce user visible error when certain kind of failure occur and make it possible to trade off between observable error and latency allow the engine to preempt task to overcome skew resource over allocation etc pave the way to granular checkpointing and recovery workload migration etc idea and consideration find the transitive closure of task stage that need to be restart give a task failure 1 if the task have no observable output include it 2 if the task have consume input that need to be recompute repeat 1 for each of its source 3 if the task have observable output repeat 1 for each downstream task todo refine for bucket by bucket execution or other form of vertical partitioned execution need to be able to account all waste resource cpu byte read etc due to restart |
prestodbpresto | implement tablesample system for subquerie | Bug | current system sampling do nothing for subquerie which be contrary to the sql specification otherwise result of tf be a table contain approximately n s 100 row of rt the probability of a row of rt be include in result of tf be s 100 from distributedexecutionplanner java todo when this happen we should switch to either bernoulli or page sample do page level sampling would be fast and within the spirit of the specification |
prestodbpresto | row number produce wrong result with some inequality filter | Bug | a filter of x or 0 on row number would be optimize and produce correct empty result set presto ad metric select i d val rank from select i d val row number over partition by i d as rank from test where rank 0 i d val rank 0 row but if we change the filter to x where x be a negative number it produce non empty result set which be wrong presto ad metric select i d val rank from select i d val row number over partition by i d as rank from test where rank 1 i d val rank 1 100 1 2 50 1 2 row this be because the planner create a rownumbernode but visitfilter do not try to optimize it because the tupledomain and the range represent by upperbound be the same instead it just return the original rownumbernode with maxrowcountperpartition 1 to fix this the planner should recogonize this be an empty upperbound |
prestodbpresto | push down limit through left join | Enhancement | for a query like select from a left outer join b on a key b key order by a something limit 10 the limit can be apply before the join as in select from select from a order by a something limit 10 leave outer join b on a key b key order by a something limit 10 furthermore if we know that b key be unique we could even eliminate the limit above the join leave only limit below on the left side |
prestodbpresto | topnrownumber fail when update the memory usage | Bug | presto tiny select custkey orderkey rank from select custkey orderkey row number over partition by custkey order by orderkey as rank from order where rank 3 query 20180120 011051 00000 rajdf fail 4 node split 68 total 47 do 69 12 cpu time 3 0s total 5k rows s 0b s 9 active per node 0 2 parallelism 1 09k row s 0b s parallelism 0 9 0 03 15k row 0b 4 37k row s 0b s query 20180120 011051 00000 rajdf fail byte can not be negative java lang illegalargumentexception byte can not be negative at com google common base precondition checkargument precondition java 122 at com facebook presto memory context simplelocalmemorycontext setbyte simplelocalmemorycontext java 55 at com facebook presto operator operatorcontext decoratedlocalmemorycontext setbyte operatorcontext java 632 at com facebook presto operator topnrownumberoperator getpage topnrownumberoperator java 341 at com facebook presto operator topnrownumberoperator getoutput topnrownumberoperator java 252 at com facebook presto operator driver processinternal driver java 379 at com facebook presto operator driver lambda processfor 8 driver java 278 at com facebook presto operator driver trywithlock driver java 645 at com facebook presto operator driver processfor driver java 272 at com facebook presto execution sqltaskexecution driversplitrunner processfor sqltaskexecution java 975 at com facebook presto execution executor prioritizedsplitrunner process prioritizedsplitrunner java 162 at com facebook presto execution executor legacyprioritizedsplitrunner process legacyprioritizedsplitrunner java 23 at com facebook presto execution executor taskexecutor taskrunner run taskexecutor java 492 at java util concurrent threadpoolexecutor runworker threadpoolexecutor java 1149 at java util concurrent threadpoolexecutor worker run threadpoolexecutor java 624 at java lang thread run thread java 748 |
prestodbpresto | planner fail to create correct topnrownumber node with invalid filter on row number | Bug | when there be a filter on row number we try to push down the filter and replace the window operator with topnrownumber operator and a filter operator on top if the filter have invalid range the query will fail with the above error presto tiny explain type distribute select orderkey orderdate rank from select orderkey orderdate row number over partition by orderkey order by orderdate desc as rank from order where rank 1 query 20180119 211226 00015 vy95y fail maxrowcountperpartition must be 0 java lang illegalargumentexception maxrowcountperpartition must be 0 at com google common base precondition checkargument precondition java 122 at com facebook presto sql planner plan topnrownumbernode topnrownumbernode java 60 at com facebook presto sql planner optimization windowfilterpushdown rewriter converttotopnrownumber windowfilterpushdown java 260 at com facebook presto sql planner optimization windowfilterpushdown rewriter visitfilter windowfilterpushdown java 169 at com facebook presto sql planner optimization windowfilterpushdown rewriter visitfilter windowfilterpushdown java 84 at com facebook presto sql planner plan filternode accept filternode java 72 at com facebook presto sql planner plan simpleplanrewriter rewritecontext rewrite simpleplanrewriter java 84 at com facebook presto sql planner plan simpleplanrewriter rewritecontext lambda defaultrewrite 0 simpleplanrewriter java 73 this be because we use the range 1 upperbound in filter as the limit of the topnrownumber and enforce the upperbound must be great than 0 therefore if the user use some invalid range like row number 1 the query will fail with a valid filter like where row number between 99 100 the follow plan be create explain type distribute select orderkey orderdate rank from select orderkey orderdate row number over partition by orderkey order by orderdate desc as rank from order where rank 10000 and rank 9999 query plan fragment 0 single output layout orderkey orderdate row number 2 output partition single execution flow ungrouped execution output orderkey orderdate rank orderkey bigint orderdate date row number 2 bigint rank row number 2 remotesource 1 orderkey bigint orderdate date row number 2 bigint fragment 1 tpch order 15000 output layout orderkey orderdate row number 2 output partition single execution flow ungrouped execution filter filterpredicate row number 2 bigint 10000 and row number 2 bigint 9999 orderkey bigint orderdate date row number 2 bigint project orderkey bigint orderdate date row number 2 bigint topnrownumber partition by orderkey order by orderdate desc null last limit 10000 hashvalue orderkey bigint orderdate date hashvalue bigint row number 2 bigint row number 2 row number scanproject table tpch tpch order sf0 01 originalconstraint true orderkey bigint orderdate date hashvalue bigint cost row 15000 byte row 15000 bytes hashvalue combine hash bigint 0 coalesce operator hash code orderkey 0 orderkey tpch orderkey orderdate tpch orderdate one interesting thing to notice be that no matter how narrow the filter range lb ub be we always use topnrownumber 1 ub then apply the filter on top of it in the above query we have limit 10000 range 1 10000 for this topnrownumber which be not always helpful |
prestodbpresto | finish inner right outer join early when right side of the join be empty | Enhancement | consider a query like with x as select 1 as i d from value 1 as t i d where false y as select 2 as i d select from y right outer join x on y i d x i d the query win t return any result however the left side would have be fully evaluate terminate query with right outer join if the right side doesn t produce any row this also apply to inner join if there be a side that produce 0 row and a join be involve then the query could finish pretty early |
prestodbpresto | verifyexception exception when execute right outer join | Bug | hi I use presto 0 192 hdp 2 5 3 hive connector verifyexception occur in the follow query select yyyymmdd from test view where yyyymmdd 20180117 limit 1 view ddl create or replace view test view as select b yyyymm b yyyymmdd count distinct as from a right outer join select distinct yyyymmdd substr yyyymmdd 1 6 as yyyymm from cross join b on a yyyymmdd b yyyymmdd and group by b yyyymm b yyyymmdd stacktrace com google common base verifyexception undefine at com google common base verify verify verify java 99 at com facebook presto operator partitionedlookupsource outerpositiontracker factory getouterpositioniterator partitionedlookupsource java 299 at com facebook presto operator partitionedlookupsource 1 getouterpositioniterator partitionedlookupsource java 65 at com facebook presto operator partitionedlookupsourcefactory getouterpositioniterator partitionedlookupsourcefactory java 362 at com facebook presto operator lookupjoinoperatorfactory perlifespandata lambda new 1 lookupjoinoperatorfactory java 315 at com google common util concurrent abstracttransformfuture transformfuture dotransform abstracttransformfuture java 239 at com google common util concurrent abstracttransformfuture transformfuture dotransform abstracttransformfuture java 229 at com google common util concurrent abstracttransformfuture run abstracttransformfuture java 130 at com google common util concurrent moreexecutor directexecutor execute moreexecutor java 399 at com google common util concurrent abstractfuture executelistener abstractfuture java 902 at com google common util concurrent abstractfuture complete abstractfuture java 813 at com google common util concurrent abstractfuture setfuture abstractfuture java 713 at com google common util concurrent abstracttransformfuture asynctransformfuture setresult abstracttransformfuture java 221 at com google common util concurrent abstracttransformfuture asynctransformfuture setresult abstracttransformfuture java 200 at com google common util concurrent abstracttransformfuture run abstracttransformfuture java 177 at com google common util concurrent moreexecutor directexecutor execute moreexecutor java 399 at com google common util concurrent abstractfuture executelistener abstractfuture java 902 at com google common util concurrent abstractfuture complete abstractfuture java 813 at com google common util concurrent abstractfuture set abstractfuture java 655 at com google common util concurrent settablefuture set settablefuture java 48 at com facebook presto operator referencecount release referencecount java 55 at com google common io close close close java 216 at com facebook presto operator lookupjoinoperator close lookupjoinoperator java 514 at com facebook presto operator driver destroyifnecessary driver java 496 at com facebook presto operator driver trywithlock driver java 667 at com facebook presto operator driver processfor driver java 272 at com facebook presto execution sqltaskexecution driversplitrunner processfor sqltaskexecution java 975 at com facebook presto execution executor prioritizedsplitrunner process prioritizedsplitrunner java 163 at com facebook presto execution executor legacyprioritizedsplitrunner process legacyprioritizedsplitrunner java 23 at com facebook presto execution executor taskexecutor taskrunner run taskexecutor java 492 at java util concurrent threadpoolexecutor runworker threadpoolexecutor java 1142 at java util concurrent threadpoolexecutor worker run threadpoolexecutor java 617 at java lang thread run thread java 745 if I modify view not to use right outer join in the follow error will be fix although I m not sure why create or replace view test view as select a yyyymm a yyyymmdd count distinct as from select distinct yyyymmdd substr yyyymmdd 1 6 as yyyymm from cross join a leave outer join b on a yyyymmdd b yyyymmdd and group by a yyyymm a yyyymmdd thank |
prestodbpresto | query with row number never complete | Bug | sql select from select row number over rn where rn 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.