repository
stringclasses
156 values
issue title
stringlengths
1
1.01k
labels
stringclasses
8 values
body
stringlengths
1
270k
prestodbpresto
feature request for memory connector
Enhancement
user have request that we provide a low latency cache to power dashboard and speed up etl with the follow feature cache to hold datum in memory for low latency access evenly skewed datum so that all worker have the same amount of memory lightweight low cpu compression for the cache datum different encoding to aid in fast access for filter aggregation to the datum
prestodbpresto
lambda can not be use inside unnest
Bug
presto select from unn transform sequence 1 5 x x x query 20180110 011726 00386 hgjdi fail com facebook presto sql tree arithmeticbinaryexpression can not be cast to java lang long java lang classcastexception com facebook presto sql tree arithmeticbinaryexpression can not be cast to java lang long at com facebook presto gen varargstomapadapter 3751 varargstomap unknown source at java lang invoke methodhandleproxie 1 invoke methodhandleproxie java 187 at com sun proxy proxy457 apply unknown source at com facebook presto gen arraytransform 3752 transform unknown source at java lang invoke methodhandle invokewithargument methodhandle java 627 at java lang invoke methodhandle invokewithargument methodhandle java 649 at com facebook presto sql functioninvoker invoke functioninvoker java 88 at com facebook presto sql planner expressioninterpreter visitor visitfunctioncall expressioninterpreter java 971 at com facebook presto sql tree functioncall accept functioncall java 114 at com facebook presto sql tree astvisitor process astvisitor java 27 at com facebook presto sql planner expressioninterpreter evaluate expressioninterpreter java 271 at com facebook presto sql planner expressioninterpreter evaluateconstantexpression expressioninterpreter java 234 at com facebook presto sql planner relationplanner visitunn relationplanner java 523 at com facebook presto sql planner relationplanner visitunn relationplanner java 94 at com facebook presto sql tree unnest accept unnest java 62 at com facebook presto sql tree astvisitor process astvisitor java 27 at com facebook presto sql planner queryplanner planfrom queryplanner java 269 at com facebook presto sql planner queryplanner plan queryplanner java 150 at com facebook presto sql planner relationplanner visitqueryspecification relationplanner java 467 at com facebook presto sql planner relationplanner visitqueryspecification relationplanner java 94 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 258 at com facebook presto sql planner queryplanner plan queryplanner java 130 at com facebook presto sql planner relationplanner visitquery relationplanner java 460 at com facebook presto sql planner relationplanner visitquery relationplanner java 94 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 376 at com facebook presto sql planner logicalplanner planstatementwithoutoutput logicalplanner java 175 at com facebook presto sql planner logicalplanner planstatement logicalplanner java 156 at com facebook presto sql planner logicalplanner plan logicalplanner java 127 at com facebook presto sql planner logicalplanner plan logicalplanner java 122 at com facebook presto execution sqlqueryexecution doanalyzequery sqlqueryexecution java 363 at com facebook presto execution sqlqueryexecution analyzequery sqlqueryexecution java 342 at com facebook presto execution sqlqueryexecution start sqlqueryexecution java 274 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
prestodbpresto
show schemas table in memory connector recognize only default and information schema schema
Bug
memory connector can create schema but show schema and show table doesn t recognize it below be reproduce step presto create table memory test t1 c1 int create table presto show schemas in memory schema default information schema 2 row query 20180104 022814 00199 x222s finish 1 node split 18 total 18 do 100 00 0 00 2 row 35b 37 row s 651b s presto presto show table in memory test query 20180104 023102 00200 x222s fail line 1 1 schema test do not exist show table in memory test show column and of course select query success presto show column in memory test t1 column type extra comment c1 integer 1 row query 20180104 023539 00202 x222s finish 1 node split 18 total 18 do 100 00 0 00 1 row 54b 12 rows s 683b s presto presto select from memory test t1 c1 0 row query 20180104 023134 00201 x222s finish 1 node split 17 total 17 do 100 00 0 00 0 row 0b 0 rows s 0b s
prestodbpresto
incorrect filter clause evaluation order
Bug
accord to the sql specification the filter clause for an aggregation query should be apply to the row in the group before the argument to the aggregation be evaluate currently expression in the aggregation argument be evaluate before the filter lead to query fail when they shouldn t for example sql select sum 1 a filter where a 0 from value 1 0 t a fail with by zero error reference 10 9 d if af be immediately contain in a sfs then a group of a group table of the aggregation query of sfs 2 let t be the argument source of af 4 case a if be specify then the be effectively evaluate for each row of t let t1 be the collection of row of t for which the result of the be true b otherwise let t1 be t 7 if be specify then a let tx be the single column table that be the result of apply the to each row of t1 and eliminate null value
prestodbpresto
enable dynamically register function
Enhancement
goal allow for coexistence of function and type with similar name but different semantic e g compatibility layer for other database like teradata oracle mysql vertica postgresql etc allow for tight control of what function be available in a give deployment make it possible to implement user define function and type in the future feature configurable mountable function plugin consideration and open question function should be resolve to a handle during analysis just like table function resolution should be transaction aware function metadata can be fetch use a handle on the coordinator function implementation can be retrieve use the handle on coordinator and worker optimizer can lookup function use fully a specify signature function handle should be transport to worker without require a full rewrite of the plan ir spi interface should be easy to implement need to define migration strategy for re package exist function library todo x introduce proper function abstraction to engine functionmanager functionhandle etc 11851 12427 12444 12472 12542 12541 x simplify function resolution extract resolution logic from functionregistry resolve function use simple metadata interface move resolution to be inside analyzer like table resolution x simplify function instance usage move call convention resolution to be inside of functionmanager caller should really only need to deal with convention and method handle x clarify function resolution logic involve multiple function namespace move exist function registration to system catalog add namespace abstraction store sql function support ref old pr with implementation of store procedure 2702 x create function statement 13254 x alter function drop function statement 13799 13412 grant for function access x function namespace manager to manage store sql function 13972 reference 4 34 sql path an sql path be a list of one or more s that determine the search order for one of the follow the subject routine of a whose do not contain a the user define type when the do not contain a 4 43 3 sql session property an sql session have an sql path that be use to effectively qualify unqualified s the sql path be initially set to an implementation de ned value but can subsequently be change by the successful execution of a the text define the sql path can be reference by use the current path 6 4 and 4 the declare type of current user current role session user system user current catalog current schema and current path be character string whether the character string be fix length or variable length and its length if it be fix length or maximum length if it be variable length be implementation de ned the character set of the character string be sql identifier the declare type collation be the character set collation of sql identifier and the collation derivation be implicit 12 the value specify by current path be a where s be s and the s be s each be separate from the precede by a with no intervening s the schema reference in this be those reference in the sql path of the current sql session context in the order in which they appear in that sql path 10 3 function specify an order for search for an sql invoke routine format path syntax rule 1 no two s contain in shall be equivalent 19 8 function set the sql path use to determine the subject routine of s with unqualified s in s that be prepare in the current sql session by an or a and in s that be invoke directly the sql path remain the current sql path of the sql session until another sql path be successfully set format set path syntax rule 1 the declare type of the shall be a character string type access rule none general rule 1 let s be and let v be the character string that be the value of trim both from s a if v do not conform to the format and syntax rule of a then an exception condition be raise invalid schema name list specification b the sql path of the current sql session be set to v note 724 a that be execute between a and an have no effect on the prepared statement conformance rule 1 without feature s071 sql path in function and type name resolution conform sql language shall not contain a
prestodbpresto
presto doesn t start on local machine with java 8
Bug
when start new version of presto from master from intellij with java 8 the follow error happen 2017 12 20t15 55 59 785 0100 warn query management 0 com facebook presto memory remotenodememory memory info update request to have not return in 21 94 disconnect from the target vm address 127 0 0 1 65173 transport socket 2017 12 20t15 56 28 410 0100 error main com facebook presto server prestoserver error loading pom user sopel39 desktop projekty starburstdata presto presto main presto blackhole pom xml java lang runtimeexception error loading pom user sopel39 desktop projekty starburstdata presto presto main presto blackhole pom xml at io airlift resolver artifactresolver resolvepom artifactresolver java 141 at com facebook presto server pluginmanag buildclassloaderfrompom pluginmanager java 239 at com facebook presto server pluginmanager buildclassloader pluginmanager java 228 at com facebook presto server pluginmanager loadplugin pluginmanager java 152 at com facebook presto server pluginmanager loadplugin pluginmanag java 140 at com facebook presto server prestoserver run prestoserver java 116 at com facebook presto server prestoserver main prestoserver java 66 cause by org apache maven project projectbuildingexception some problem be encounter while process the pom error fail to determine java version for profile java9 surefire io airlift airbase 78 user sopel39 m2 repository io airlift airbase 78 airbase 78 pom line 1324 column 22 at org apache maven project defaultprojectbuilder build defaultprojectbuilder java 176 at org apache maven project defaultprojectbuilder build defaultprojectbuilder java 102 at io airlift resolver artifactresolver resolvepom artifactresolver java 134 6 more cause by org apache maven model building modelbuildingexception 1 problem be encounter while build the effective model for com facebook presto presto blackhole 0 192 snapshot error fail to determine java version for profile java9 surefire io airlift airbase 78 user sopel39 m2 repository io airlift airbase 78 airbase 78 pom line 1324 column 22 at org apache maven model building defaultmodelproblemcollector newmodelbuildingexception defaultmodelproblemcollector java 195 at org apache maven model build defaultmodelbuilder build defaultmodelbuilder java 419 at org apache maven model build defaultmodelbuilder build defaultmodelbuilder java 371 at org apache maven model build defaultmodelbuilder build defaultmodelbuilder java 362 at org apache maven model build defaultmodelbuilder build defaultmodelbuilder java 232 at org apache maven project defaultprojectbuilder build defaultprojectbuilder java 142 8 more I think this be relate to bash 3 2 java version java version 1 8 0 152 cc electrum ilfrin findepi
prestodbpresto
implement hmac function
Enhancement
they should be implement per suggest name hmac sha1 hmac md5 etc and should take a varbinary key and message
prestodbpresto
allow timestamp truncation to a multiple of second minute
Enhancement
add an overload of date trunc in a form date trunc unit n timestamp e g date trunc second 5 some timestamp this would truncate timestamp to multiple of n unit the constraint would be that thehigherunit to unit n 0 so 7 minute would not be allow follow discussion under cc electrum sopel39
prestodbpresto
selective aggregate filter apply too late
Bug
query with test as select from value 1 a good 2 b good x c bad as t v k name select map agg cast v as bigint low k filter where name good as col1 array agg cast v as bigint filter where name good as col2 from test fail with can not cast x to bigint seem that cast be evaluate even for row which will be filter out by filter condition if I add where name good it doesn t fail but semantically it be the same query
prestodbpresto
allow modulus operation on timestamp and interval day to second type
Enhancement
give table with timestamp information one could want to aggregate this datum into 5 second bucket therefore I propose to allow operation between timestamp and interval day to second thus some timestamp interval 5 second would round down the timestamp value to a timestamp that be a multiple of 5 second allow aggregation currently the simple alternative be date trunc second some timestamp interval 1 second second some timestamp 5 I would be reluctant to allow the same for timestamp with time zone as the semantic would not be as obvious as they would be for timestamp
prestodbpresto
support extract millisecond from a timestamp
Enhancement
presto select extract second from timestamp 2017 10 24 23 00 23 206 col0 23 but presto select extract millisecond from timestamp 2017 10 24 23 00 23 206 query 20171208 215149 00048 uhmtc fail line 1 8 invalid extract field millisecond imo this should be support
prestodbpresto
cli should refuse to work with expire certificate in keystore path
Bug
when run product test we re use docker cluster jks file that contain an expired certificate cli should by default refuse to authenticate server when server use an expired certificate but it doesn t do that not only in test at least when keystore path be specify
prestodbpresto
get try to free more revocable memory than be reserve randomly when use spill
Bug
presto version 0 188 here be stacktrace for the error java lang illegalargumentexception try to free more revocable memory than be reserve at com google common base precondition checkargument precondition java 122 at com facebook presto memory memorypool freerevocable memorypool java 196 at com facebook presto memory querycontext freerevocablememory querycontext java 168 at com facebook presto operator taskcontext freerevocablememory taskcontext java 226 at com facebook presto operator pipelinecontext freerevocablememory pipelinecontext java 274 at com facebook presto operator drivercontext freerevocablememory drivercontext java 254 at com facebook presto operator operatorcontext freerevocablememory operatorcontext java 315 at com facebook presto operator operatorcontext setrevocablememoryreservation operatorcontext java 307 at com facebook presto operator hashbuilderoperator lambda close 11 hashbuilderoperator java 644 at com google common io close close close java 216 at com facebook presto operator hashbuilderoperator close hashbuilderoperator java 645 at com facebook presto operator hashbuilderoperator finish hashbuilderoperator java 450 at com facebook presto operator driver processinternal driver java 357 at com facebook presto operator driver lambda processfor 6 driver java 241 at com facebook presto operator driver trywithlock driver java 614 at com facebook presto operator driver processfor driver java 235 at com facebook presto execution sqltaskexecution driversplitrunner processfor sqltaskexecution java 622 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
incorrect query result when join on time timestamp with time zone due to equality inference
Bug
even though in the follow query cast f a as varchar avc evaluate to true presto with f as select time 03 00 00 000 01 00 a g as select time 04 00 00 000 02 00 b 03 00 00 000 01 00 avc select cast f a as varchar cast f a as varchar avc equal from f join g on f a g b a b avc col3 equal 03 00 00 000 01 00 03 00 00 000 01 00 03 00 00 000 01 00 03 00 00 000 01 00 true 1 row the same condition put in where evaluate to false presto with f as select time 03 00 00 000 01 00 a g as select time 04 00 00 000 02 00 b 03 00 00 000 01 00 avc select from f join g on f a g b where cast f a as varchar avc a b avc 0 row in the example above the filtering condition be simplify to false during planning but query produce same result when f and g be regular table e g in the memory connector this be most probably cause by the predicatepushdown and equality inference which conclude that f join g on f a g b f a and g b be interchangeable but they aren t because of how time timestamp with time zone equality be define see issuecomment 347981000 for more information cc martint losipiuk
prestodbpresto
it s not possible to query jdbc connector information schema column when there be a table with all unsupported data type column
Bug
step to reproduce 1 create table m m interval in postgre 1 use postgresql connector select from postgresql information schema column query 20171129 143915 00004 exah8 fail table have no support column type public m com facebook presto spi prestoexception table have no support column type public m at com facebook presto plugin jdbc basejdbcclient getcolumns basejdbcclient java 227 at com facebook presto plugin jdbc jdbcmetadata gettablemetadata jdbcmetadata java 95 at com facebook presto plugin jdbc jdbcmetadata listtablecolumns jdbcmetadata java 136 at com facebook presto metadata metadatamanager listtablecolumns metadatamanager java 419 at com facebook presto metadata metadataliste listtablecolumn metadataliste java 93 at com facebook presto connector informationschema informationschemapagesourceprovider buildcolumn informationschemapagesourceprovider java 169 at com facebook presto connector informationschema informationschemapagesourceprovider getinformationschematable informationschemapagesourceprovider java 144 at com facebook presto connector informationschema informationschemapagesourceprovider getinternaltable informationschemapagesourceprovider java 138 at com facebook presto connector informationschema informationschemapagesourceprovider createpagesource informationschemapagesourceprovider java 96 at com facebook presto split pagesourcemanager createpagesource pagesourcemanager java 56 at com facebook presto operator tablescanoperator getoutput tablescanoperator java 259 at com facebook presto operator driver processinternal driver java 337 at com facebook presto operator driver lambda processfor 6 driver java 241 at com facebook presto operator driver trywithlock driver java 614 at com facebook presto operator driver processfor driver java 235 at com facebook presto execution sqltaskexecution driversplitrunner processfor sqltaskexecution java 622 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 I think a well behavior would be to ignore unsupported column just like we do for table where unsupported column exist together with support one
prestodbpresto
setsessiontask do not validate that value decode
Bug
we allow set an invalid session property cause the cli or other client to get stick with the invalid value which can t be change because future query be reject presto set session iterative optimizer timeout xxx set session presto select 123 query 20171129 055858 00027 aw6kc fail iterative optimizer timeout be invalid xxx presto set session iterative optimizer timeout 5s query 20171129 055907 00028 aw6kc fail iterative optimizer timeout be invalid xxx note that other type of error such as use the wrong type or set a property which doesn t exist be validate properly
prestodbpresto
timestamp with time zone and time with time zone equality doesn t conform to standard
Bug
sql 2003 say time contain the s hour minute and second timestamp contain the s year month day hour minute and second this listing wasn t suppose to cover timezone hour timezone minute field present in the with time zone datum type item of type datetime be comparable only if they have the same s my understanding be that the time and timestamp equality and comparison should be base on those field this be far reinforce by reason that if value be print differently then they be different not equal and that if a b then hour a hour b which doesn t hold today thus the following should return false but they return true now select timestamp 2012 06 07 10 13 00 01 00 timestamp 2012 06 07 11 13 00 02 00 select time 10 13 00 01 00 time 11 13 00 02 00 select time 10 13 00 01 00 time 11 13 00 05 00 this should be fix after 9385 cc losipiuk kokose martint
prestodbpresto
add proper support for time with time zone and timestamp with time zone to jdbc driver
Bug
currently presto jdbc driver incorrectly map time w tz and timestamp w tz column to jdbc type time w tz be map to java sql type time and should be map to java sql type time with timezone timestamp w tz be map to java sql type timestamp and should be map to java sql type timestamp with timezone fix this should wait until work on be finish cc findepi
prestodbpresto
number decimal literal with digit on only one side of the dot should be reject
Bug
as per martint s comment discussion r151808814 123 I don t think this be a valid literal in sql and that it s a bug for presto to accept they
prestodbpresto
integer overflow possible when multiply interval year to month and integer
Bug
currently we detect integer overflow when multiply integer value presto select 256 256 256 256 query 20171114 154126 00068 9ghqy fail integer multiplication overflow 16777216 256 however when multiply interval year to month and integer value overflow be silently ignore presto select interval 1 year 256 256 256 256 col0 0 0 1 row
prestodbpresto
interval type not support in cast
Bug
cast null as interval year to month cast null as interval day to second cast null as interval hour to second etc fail with a parse error com facebook presto sql parser parsingexception line 1 30 mismatch input day expect array at com facebook presto sql parser sqlparser 1 syntaxerror sqlparser java 48 at org antlr v4 runtime proxyerrorlistener syntaxerror proxyerrorlistener java 41 at org antlr v4 runtime parser notifyerrorlistener parser java 540 at org antlr v4 runtime defaulterrorstrategy reportinputmismatch defaulterrorstrategy java 301 at org antlr v4 runtime defaulterrorstrategy reporterror defaulterrorstrategy java 124 at com facebook presto sql parser sqlbaseparser type sqlbasepars java 9186 at com facebook presto sql parser sqlbaseparser primaryexpression sqlbaseparser java 8076 at com facebook presto sql parser sqlbaseparser valueexpression sqlbasepars java 6867 at com facebook presto sql parser sqlbaseparser predicate sqlbaseparser java 6132 at com facebook presto sql parser sqlbaseparser booleanexpression sqlbasepars java 6023 at com facebook presto sql parser sqlbaseparser expression sqlbaseparser java 5767 at com facebook presto sql parser sqlbaseparser selectitem sqlbaseparser java 4809 at com facebook presto sql parser sqlbaseparser queryspecification sqlbaseparser java 3906 at com facebook presto sql parser sqlbaseparser queryprimary sqlbaseparser java 3674 at com facebook presto sql parser sqlbaseparser queryterm sqlbasepars java 3479 at com facebook presto sql parser sqlbaseparser querynowith sqlbaseparser java 3330 at com facebook presto sql parser sqlbaseparser query sqlbaseparser java 2759 at com facebook presto sql parser sqlbaseparser statement sqlbaseparser java 1412 at com facebook presto sql parser sqlbaseparser singlestatement sqlbasepars java 234 at com facebook presto sql parser sqlparser invokeparser sqlparser java 95 at com facebook presto sql parser sqlparser createstatement sqlparser java 68
prestodbpresto
highly selective limit query don t complete as soon as require datum be output
Bug
a query like the follow one on a large table 19 8b row 347 gb where only one row match the where clause keep run after that row be return to the client sql select 1 from t where x limit 1 it affect 0 188 not sure about early version
prestodbpresto
validate dictionary ids in orc reader
Bug
we should make sure the id be in range before create the block so that we can throw a proper orccorruptionexception java lang arrayindexoutofboundsexception 61023 at com facebook presto spi block dictionaryblock calculatecompactsize dictionaryblock java 210 at com facebook presto spi block dictionaryblock getsizeinbyte dictionaryblock java 198 at com facebook presto spi block dictionaryblock getregionsizeinbytes dictionaryblock java 228 at com facebook presto spi block mapblock calculatesize mapblock java 140 at com facebook presto spi block mapblock getsizeinbyte mapblock java 129 at com facebook presto orc orcrecordreader readblock orcrecordreader java 372 at com facebook presto hive orc orcpagesource orcblockloader load orcpagesource java 234 at com facebook presto hive orc orcpagesource orcblockloader load orcpagesource java 210 at com facebook presto spi block lazyblock assureloade lazyblock java 256 at com facebook presto spi block lazyblock isnull lazyblock java 227 at com facebook presto gen pagefilter 20171027 200026 03797 4hf6i 1 195 802 filter unknown source at com facebook presto gen pagefilter 20171027 200026 03797 4hf6i 1 195 802 filter unknown source at com facebook presto operator project pageprocessor process pageprocessor java 85 at com facebook presto operator scanfilterandprojectoperator processpagesource scanfilterandprojectoperator java 281 at com facebook presto operator scanfilterandprojectoperator getoutput scanfilterandprojectoperator java 229 at com facebook presto operator driver processinternal driver java 337 at com facebook presto operator driver lambda processfor 6 driver java 241 at com facebook presto operator driver trywithlock driver java 614 at com facebook presto operator driver processfor driver java 235 at com facebook presto execution sqltaskexecution driversplitrunner processfor sqltaskexecution java 622 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 485 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
wrong error message for union type mismatch
Bug
this should be column 1 not 0 presto select 123 foo union all select bar 999 query 20171027 202828 44812 fkpyx fail line 1 19 column 0 in union query have incompatible type integer varchar 3
prestodbpresto
decimal cast error be not handle correctly
Bug
these should throw invalid cast argument with a useful error message presto select cast foo as decimal query 20171026 175718 55655 ivxzb fail null java lang numberformatexception at java math bigdecimal bigdecimal java 596 at java math bigdecimal bigdecimal java 383 at java math bigdecimal bigdecimal java 806 at com facebook presto type decimalcast varchartolongdecimal decimalcast java 583 at java lang invoke methodhandle invokewithargument methodhandle java 627 compare to bigint presto select cast foo as bigint query 20171026 175841 55785 ivxzb fail can not cast foo to bigint com facebook presto spi prestoexception can not cast foo to bigint at com facebook presto type varcharoperator casttobigint varcharoperator java 177 at java lang invoke methodhandle invokewithargument methodhandle java 627
prestodbpresto
array intersect can fail on null
Bug
the code incorrectly call type compareto without first check block isnull
prestodbpresto
column can not be resolve for view
Bug
step to reproduce create table memory default t s varchar create view memory default v as select s from memory default t select memory default t s from memory default t work select memory default v s from memory default v fail with column memory default v s can not be resolve I be integrate presto 0 186 with metabase 0 26 1 and in my environment I have create a catalog just to create view that map my business rule so when metabase try to submit any query that project column in format presto return the follow error column can not be resolve I have try several time in several different way to discover the origin of that error but the conclusion be it just occur with view after debug presto project I find a possible solution follow the code in presto main src main java com facebook presto sql analyzer field java public boolean matchesprefix optional prefix return prefix ispresent relationalia ispresent relationalia get hassuffix prefix get be change to public boolean matchesprefix optional prefix return prefix ispresent relationalia ispresent relationalia get hassuffix prefix get supplier if origintable ispresent return false int idx 0 boolean match true qualifiedobjectname origin origintable get list prefix prefix get getpart switch prefix size case 3 match origin getcatalogname equalsignorecase prefix get idx case 2 match match origin getschemaname equalsignorecase prefix get idx case 1 match match origin getobjectname equalsignorecase prefix get idx return idx 0 match get in my test it be work well sg
prestodbpresto
concurrentmodificationexception in bridginghivemetastore
Bug
try to drop a column from a hive table with presto 0 186 throw a concurrentmodificationexception java util concurrentmodificationexception at java util arraylist itr checkforcomodification arraylist java 901 at java util arraylist itr next arraylist java 851 at com facebook presto hive metastore bridginghivemetastore dropcolumn bridginghivemetastore java 214 at com facebook presto hive metastore cachinghivemetastore dropcolumn cachinghivemetastore java 495 at com facebook presto hive metastore cachinghivemetastore dropcolumn cachinghivemetastore java 495 at com facebook presto hive metastore semitransactionalhivemetastore lambda dropcolumn 9 semitransactionalhivemetastore java 357 at com facebook presto hive metastore semitransactionalhivemetastore commit semitransactionalhivemetastore java 743 at com facebook presto hive hivemetadata commit hivemetadata java 1522 at com facebook presto hive hiveconnector commit hiveconnector java 177 at com facebook presto transaction transactionmanager transactionmetadata connectortransactionmetadata commit transactionmanager java 577 at java util concurrent executors runnableadapter call executor java 511 at com google common util concurrent trustedlistenablefuturetask trustedfutureinterruptibletask runinterruptibly trustedlistenablefuturetask java 111 at com google common util concurrent interruptibletask run interruptibletask java 58 at com google common util concurrent trustedlistenablefuturetask run trustedlistenablefuturetask java 75 at io airlift concurrent boundedexecutor drainqueue boundedexecutor java 78 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 748 the table in question look like this presto show create table hive default post create table hive default post user i d dup varchar title varchar body varchar foo integer user i d varchar with external location s3a my s3 bucket post format orc partition by array user i d and I m try to drop the column foo alter table hive default post drop column foo
prestodbpresto
row to row cast doesn t work with json type
Bug
sql select cast row json 1 as row field bigint exception detail query 20171006 040158 53624 d7r6y fail java lang verifyerror inconsistent stackmap frame at branch target 102 exception detail location com facebook presto gen rowcast 13f6822651da095c094fe44a06ba8013 259687 castrow lcom facebook presto spi connectorsession lcom facebook presto spi block block lcom facebook presto spi block block 47 goto reason current frame s stack size doesn t match stackmap current frame bci 47 flag local com facebook presto spi connectorsession com facebook presto spi block block integer com facebook presto spi block blockbuilder com facebook presto spi block blockbuilder stack stackmap frame bci 102 flag local com facebook presto spi connectorsession com facebook presto spi block block integer com facebook presto spi block blockbuilder com facebook presto spi block blockbuilder stack com facebook presto spi type type bytecode 0x0000000 033d ba00 1500 00bb 0017 59b7 001a 04b9 0x0000010 0020 0300 4e2d b900 2601 003a 042b 03b9 0x0000020 002c 0200 9900 0e19 04b9 002f 0100 57a7 0x0000030 0037 ba00 3400 0019 04ba 0039 0000 2b03 0x0000040 b900 3d03 001c 9900 0857 09a7 0016 ba00 0x0000050 4300 0059 c700 0a04 3d57 09a7 0006 b600 0x0000060 49b9 004d 0300 2db9 0050 0100 57ba 0053 0x0000070 0000 2dc0 0028 03b9 0057 0300 c000 28b0 0x0000080 stackmap table append frame 50 integer object 34 object 34 full frame 78 object 98 object 40 integer object 34 object 34 object 28 object 34 object 100 full frame 94 object 98 object 40 integer object 34 object 34 object 28 object 34 object 69 full frame 97 object 98 object 40 integer object 34 object 34 object 28 object 34 long same local 1 stack item frame 102 object 28
prestodbpresto
implement area under roc curve function
Enhancement
give a vector of outcomes true false and score double compute the area under the roc curve see for an explanation this be commonly refer to as auc or aurocc but I don t think that s a good name for the function something more explicit like area under roc curve or roc curve area be probably well to be decide whether the input be a pair of array boolean double or an array of row represent the outcome score pair the latter make more semantic sense and prevent certain illegal usage such as array with different length
prestodbpresto
support array construction with more than 254 element
Enhancement
presto select array x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x from value 0 as t x query 20170929 184152 27787 2axhq fail too many argument for array constructor
prestodbpresto
json parse succeed for invalid input
Bug
json parse do not fail on invalid input like x 1 presto select json parse x 1 col0 x 1 row
prestodbpresto
run query counter leak query
Bug
query that fail before they get to run cause the running query counter to increment but never decrement this be cause by 516801ab482c9189344304b97ff4e4429488dfc7 which call querystarte but not querystoppe
prestodbpresto
wrong query result when lambda scope shadows column name
Bug
it s not possible to use dereference expression in lambda context 9023 except when dereference lambda argument s field however even in the support case result be different when lambda arguement shadow a column reference select transform array cast row 10 as row x integer r r x from value 1 u x col0 10 1 row select transform array cast row 10 as row x integer r r x from value 1 r x col0 1 1 row imo both query should produce 10 as column be be shadow by lambda s formal argument
prestodbpresto
query completion event doesn t capture final stat
Bug
we ve notice case where the stat record in the query completion event don t reflect the final state of the query for instance it contain information about split in flight
prestodbpresto
implicit coercion for row type not handle correctly
Bug
select row a row aa fail with query 20170920 184840 03951 gui64 fail line 1 17 can not be apply to row field0 varchar 1 row field0 varchar 2 com facebook presto sql analyzer semanticexception line 1 17 can not be apply to row field0 varchar 1 row field0 varchar 2 at com facebook presto sql analyzer expressionanalyzer visitor getoperator expressionanalyzer java 1147 at com facebook presto sql analyzer expressionanalyzer visitor visitcomparisonexpression expressionanalyzer java 446 at com facebook presto sql analyzer expressionanalyzer visitor visitcomparisonexpression expressionanalyzer java 282 at com facebook presto sql tree comparisonexpression accept comparisonexpression java 71 at com facebook presto sql tree stackableastvisitor process stackableastvisitor java 26 at com facebook presto sql analyzer expressionanalyzer visitor process expressionanalyzer java 301 at com facebook presto sql analyzer expressionanalyzer analyze expressionanalyzer java 258 at com facebook presto sql analyzer expressionanalyzer analyzeexpression expressionanalyzer java 1466 at com facebook presto sql analyzer statementanalyzer visitor analyzeexpression statementanalyzer java 1834 at com facebook presto sql analyzer statementanalyzer visitor analyzeselect statementanalyzer java 1646 at com facebook presto sql analyzer statementanalyzer visitor legacyvisitqueryspecification statementanalyzer java 909 at com facebook presto sql analyzer statementanalyzer visitor visitqueryspecification statementanalyzer java 854 at com facebook presto sql analyzer statementanalyzer visitor visitqueryspecification statementanalyzer java 242 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 254 at com facebook presto sql analyzer statementanalyzer visitor process statementanalyzer java 264 at com facebook presto sql analyzer statementanalyzer visitor visitquery statementanalyzer java 605 at com facebook presto sql analyzer statementanalyzer visitor visitquery statementanalyzer java 242 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 254 at com facebook presto sql analyzer statementanalyzer analyze statementanalyzer java 228 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 doanalyzequery sqlqueryexecution java 305 at com facebook presto execution sqlqueryexecution analyzequery sqlqueryexecution java 291 at com facebook presto execution sqlqueryexecution start sqlqueryexecution java 247 at com facebook presto execution queuedexecution lambda start 1 queuedexecution java 62 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 748 row a row varchar 1 should implicitly cast to row varchar 2
prestodbpresto
topnrownumber optimizer doesn t work with double constant in inequality
Enhancement
the follow optimize correctly with t as select x row number over order by x rn from select x from t where rn 10 but this do not note double constant in conditional with t as select x row number over order by x rn from select x from t where rn 10 0
prestodbpresto
fully document window specification syntax
Enhancement
for example frame be only briefly mention in the current doc
prestodbpresto
validate function with invalid argument type
Bug
this function pass validation but should fail since the java type be wrong java scalarfunction sqltype standardtype varchar public static slice test sqltype standardtype array slice input we should add more test for these type of error to testscalarvalidation
prestodbpresto
fix incorrect column name in querycompletedevent
Bug
the name be be derive from the tostring representation of column which cause they to be incorrectly format as column xyz varchar
prestodbpresto
add submittedquerie counter to sqlquerymanager
Enhancement
there s a counter for start and complete query but we re miss one that track the number of query submit to presto
prestodbpresto
sqlquerymanager queuedquerie counter leak
Bug
over time the counter increase and doesn t go back to the initial value also it doesn t reflect the number of currently queue query report by the ui look at the code the counter be incremente when a query be queue and decremente when it start run if the query fail or get cancel before it get a chance to run it win t be decremente
prestodbpresto
jsonextract do not handle invalid unicode
Bug
java lang runtimeexception java io charconversionexception invalid utf 32 character 0x7b227222 above 10ffff at char 8 byte 35 at com google common base throwable propagate throwable java 240 at com facebook presto operator scalar jsonextract extract jsonextract java 143 at com facebook presto operator scalar jsonfunction varcharjsonextractscalar jsonfunction java 398 at com facebook presto gen pagefilter 20170912 184704 30869 8bak5 2 278 332907 filter unknown source at com facebook presto gen pagefilter 20170912 184704 30869 8bak5 2 278 332907 filter unknown source at com facebook presto operator project pageprocessor process pageprocessor java 85 at com facebook presto operator scanfilterandprojectoperator processpagesource scanfilterandprojectoperator java 281 at com facebook presto operator scanfilterandprojectoperator getoutput scanfilterandprojectoperator java 229 at com facebook presto operator driver processinternal driver java 337 at com facebook presto operator driver lambda processfor 6 driver java 241 at com facebook presto operator driver trywithlock driver java 614 at com facebook presto operator driver processfor driver java 235 at com facebook presto execution sqltaskexecution driversplitrunner processfor sqltaskexecution java 622 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 485 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 748 cause by java io charconversionexception invalid utf 32 character 0x7b227222 above 10ffff at char 8 byte 35 at com fasterxml jackson core io utf32reader reportinvalid utf32reader java 189 at com fasterxml jackson core io utf32reader read utf32reader java 150 at com fasterxml jackson core json readerbasedjsonparser loadmore readerbasedjsonparser java 241 at com fasterxml jackson core json readerbasedjsonparser skipwsorend readerbasedjsonparser java 2346 at com fasterxml jackson core json readerbasedjsonparser nexttoken readerbasedjsonparser java 644 at com facebook presto operator scalar jsonextract extract jsonextract java 131 17 more
prestodbpresto
set cache control properly on static resource
Enhancement
set cache control could speed up the loading of large file like browser min js and therefore make the web ui a lot snappy
prestodbpresto
presto verifier 0 183 do not work
Bug
unknown column session property json in field list it seem that document have not update
prestodbpresto
raptor add constant backoff to databaseshardmanger addcolumn
Enhancement
the method raptormetadata addcolumn l443 insert row into the column table in raptor metadata and then alter the table x shard table i d this sequence be not transactional when the alter fail the new column be add to the raptor table but the entry be x shard table i d be miss the presto query fail but the column now exist which make the semantic of alter inconsistent raptormetadata addcolumn l443 call databaseshardmanager addcolumn l276 to do the alter the latter attempt 10 time to alter the x shard t table i d table in raptor metadata without wait between each attempt if the query to mysql fail quickly the loop be almost a tight loop and will not be resilient to transient error spike in cpu usage on mysql network partition service restart java override public void addcolumn long tableid columninfo column string columntype sqlcolumntype column gettype if columntype null return string sql format alter table s add column s s s s shardindextable tableid mincolumn column getcolumnid columntype maxcolumn column getcolumnid columntype int attempt 0 while true attempt try handle handle dbi open handle execute sql catch dbiexception e if issyntaxoraccesserror e exit when column already exist return if attempt max add column attempt throw metadataerror e the option consider be 1 lazily perform the alter to x shard table i d on raptor query I e query that touch datum in catalog use the raptor connector this mean a read query would mutate some persistent state and modify the metadata which be usually for cache entry for example 2 delete the row insert in the column table however as other alter could be perform concurrently it may lead to hole in the column id 3 asynchronously retry the alter in background thread 4 add a constant or linear backoff to the addcolumn loop 4 be the simple fix and should cover most case as long as it wait long enough which depend on how transient be the issue when perform the alter
prestodbpresto
all usage of trimspacesandtruncatetolength be likely wrong
Bug
for char value we must do trim truncate val x instead truncate trim val x the latter can produce value with trail space which be not valid in memory representation for char value in presto we should have a function truncatetolengthandtrimspace instead and move likely all current caller to the new function reproduce with orc slicedirectstreamreader 8712 will fix slicedirectstreamreader but not this bug in general presto default create table test hjin char with format orc as select cast a c as char 3 x create table 1 row hive alter table test hjin char change x x char 2 presto default select cast x as varchar zz from test hjin char col0 a zz presto default select upper x from test hjin char query 20170825 190517 00019 47f4s fail slice represent char should not have trail space java lang illegalargumentexception slice represent char should not have trail space at com facebook presto spi type chartype writeslice chartype java 149 at com facebook presto spi type chartype writeslice chartype java 142 at com facebook presto gen pageprojection 10 project unknown source at com facebook presto gen pageprojection 10 project unknown source at com facebook presto operator project dictionaryawarepageprojection project dictionaryawarepageprojection java 99 at com facebook presto operator project pageprocessor positionspageprocessoriterator processbatch pageprocessor java 269 at com facebook presto operator project pageprocessor positionspageprocessoriterator computenext pageprocessor java 177 at com facebook presto operator project pageprocessor positionspageprocessoriterator computenext pageprocessor java 126 at com google common collect abstractiterator trytocomputenext abstractiterator java 145 at com google common collect abstractiterator hasnext abstractiterator java 140 at com facebook presto operator project pageprocessoroutput hasnext pageprocessoroutput java 49 at com facebook presto operator scanfilterandprojectoperator processpagesource scanfilterandprojectoperator java 286 at com facebook presto operator scanfilterandprojectoperator getoutput scanfilterandprojectoperator java 229 at com facebook presto operator driver processinternal driver java 337 at com facebook presto operator driver lambda processfor 6 driver java 241 at com facebook presto operator driver trywithlock driver java 614 at com facebook presto operator driver processfor driver java 235 at com facebook presto execution sqltaskexecution driversplitrunner processfor sqltaskexecution java 622 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 483 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
incorrect result for array min max of double contain nan
Bug
array min array 1 2 nan 1 array min array nan 1 2 nan this probably occur because the array min function interpret false when compare with nan incorrectly the function should return nan if any of the element be nan similar to how null be treat
prestodbpresto
select histogram t cause json exception in presto client
Bug
to reproduce presto location select histogram array 1 query be go server restart stacktrace with debug java lang runtimeexception error fetch next at return an invalid response jsonresponse statuscode 200 statusmessage ok header content type application json date we d 23 aug 2017 21 39 58 gmt vary accept encode user agent x content type option nosniff hasvalue false error i d 20170823 213958 00044 xee46 infouri partialcanceluri nexturi column name col0 type map array integer bigint typesignature rawtype map typeargument rawtype array typeargument rawtype integer typeargument literalargument argument literalargument argument kind type signature value rawtype integer typeargument literalargument argument rawtype bigint typeargument literalargument argument literalargument argument kind type signature value rawtype array typeargument rawtype integer typeargument literalargument argument literalargument argument kind type signature value rawtype integer typeargument literalargument argument kind type signature value rawtype bigint typeargument literalargument argument datum 1 1 stat state run queue false schedule true node 1 totalsplit 18 queuedsplit 14 runningsplit 1 completedsplit 3 usertimemillis 1 cputimemilli 1 walltimemillis 2 processedrow 0 processedbyte 0 rootstage stageid 0 state run do false node 1 totalsplit 18 queuedsplit 14 runningsplit 1 completedsplit 3 usertimemillis 1 cputimemilli 1 walltimemillis 2 processedrow 1 processedbyte 0 substage progresspercentage 16 666666666666668 at com facebook presto client statementclient requestfailedexception statementclient java 363 at com facebook presto client statementclient advance statementclient java 306 at com facebook presto cli statusprinter printinitialstatusupdate statusprinter java 122 at com facebook presto cli query renderqueryoutput query java 125 at com facebook presto cli query renderoutput query java 107 at com facebook presto cli console process console java 337 at com facebook presto cli console runconsole console java 262 at com facebook presto cli console run console java 148 at com facebook presto cli presto main presto java 32 cause by java lang illegalargumentexception unable to create class com facebook presto client queryresult from json response i d 20170823 213958 00044 xee46 infouri partialcanceluri nexturi column name col0 type map array integer bigint typesignature rawtype map typeargument rawtype array typeargument rawtype integer typeargument literalargument argument literalargument argument kind type signature value rawtype integer typeargument literalargument argument rawtype bigint typeargument literalargument argument literalargument argument kind type signature value rawtype array typeargument rawtype integer typeargument literalargument argument literalargument argument kind type signature value rawtype integer typeargument literalargument argument kind type signature value rawtype bigint typeargument literalargument argument datum 1 1 stat state run queue false schedule true node 1 totalsplit 18 queuedsplit 14 runningsplit 1 completedsplit 3 usertimemillis 1 cputimemilli 1 walltimemillis 2 processedrow 0 processedbyte 0 rootstage stageid 0 state run do false node 1 totalsplit 18 queuedsplit 14 runningsplit 1 completedsplit 3 usertimemillis 1 cputimemilli 1 walltimemillis 2 processedrow 1 processedbyte 0 substage progresspercentage 16 666666666666668 at com facebook presto client jsonresponse jsonresponse java 69 at com facebook presto client jsonresponse execute jsonresponse java 143 at com facebook presto client statementclient advance statementclient java 293 7 more cause by java lang illegalargumentexception invalid json string for simple type class com facebook presto client queryresult at io airlift json jsoncodec fromjson jsoncodec java 137 at com facebook presto client jsonresponse jsonresponse java 66 9 more cause by com fasterxml jackson databind jsonmappingexception can not construct instance of com facebook presto client queryresult problem can not cast java lang string to java util list at source i d 20170823 213958 00044 xee46 infouri partialcanceluri nexturi column name col0 type map array integer bigint typesignature rawtype map typeargument rawtype array typeargument rawtype integer typeargument literalargument argument literalargument argument kind type signature value rawtype integer typeargument literalargument argument rawtype bigint typeargument literalargument argument literalargument argument kind type signature value rawtype array typeargument rawtype integer typeargument literalargument argument literalargument argument kind type signature value rawtype integer typeargument literalargument argument kind type signature value rawtype bigint typeargument literalargument argument datum 1 1 stat state run queue false schedule true node 1 totalsplit 18 queuedsplit 14 runningsplit 1 completedsplit 3 usertimemillis 1 cputimemilli 1 walltimemillis 2 processedrow 0 processedbyte 0 rootstage stageid 0 state run do false node 1 totalsplit 18 queuedsplit 14 runningsplit 1 completedsplit 3 usertimemillis 1 cputimemilli 1 walltimemillis 2 processedrow 1 processedbyte 0 substage progresspercentage 16 666666666666668 line 1 column 1718 at com fasterxml jackson databind jsonmappingexception from jsonmappingexception java 268 at com fasterxml jackson databind deserializationcontext instantiationexception deserializationcontext java 1405 at com fasterxml jackson databind deser std stdvalueinstantiator wrapasjsonmappingexception stdvalueinstantiator java 468 at com fasterxml jackson databind deser std stdvalueinstantiator rewrapctorproblem stdvalueinstantiator java 487 at com fasterxml jackson databind deser std stdvalueinstantiator createfromobjectwith stdvalueinstantiator java 276 at com fasterxml jackson databind deser valueinstantiator createfromobjectwith valueinstantiator java 224 at com fasterxml jackson databind deser impl propertybasedcreator build propertybasedcreator java 135 at com fasterxml jackson databind deser beandeserializer deserializeusingpropertybase beandeserializer java 471 at com fasterxml jackson databind deser beandeserializerbase deserializefromobjectusingnondefault beandeserializerbase java 1194 at com fasterxml jackson databind deser beandeserializer deserializefromobject beandeserializer java 314 at com fasterxml jackson databind deser beandeserializer deserialize beandeserializer java 148 at com fasterxml jackson databind objectmapper readmapandclose objectmapper java 3789 at com fasterxml jackson databind objectmapper readvalue objectmapper java 2871 at io airlift json jsoncodec fromjson jsoncodec java 134 10 more cause by java lang classcastexception can not cast java lang string to java util list at java lang class cast class java 3369 at com facebook presto client queryresult fixvalue queryresult java 242 at com facebook presto client queryresult fixvalue queryresult java 252 at com facebook presto client queryresult fixdata queryresult java 224 at com facebook presto client queryresult queryresult java 95 at sun reflect generatedconstructoraccessor15 newinstance unknown source at sun reflect delegatingconstructoraccessorimpl newinstance delegatingconstructoraccessorimpl java 45 at java lang reflect constructor newinstance constructor java 423 at com fasterxml jackson databind introspect annotatedconstructor call annotatedconstructor java 124 at com fasterxml jackson databind deser std stdvalueinstantiator createfromobjectwith stdvalueinstantiator java 274 19 more
prestodbpresto
group i d doesn t work with expression include aggregation function
Bug
the follow query fail sql select grouping orderpriority clerk as group i d sum totalprice count from order group by group set orderpriority clerk clerk stacktrace query 20170822 040005 00007 zcmwy fail invalid node expression dependency groupid not in source plan output sum 3 count clerk 4 orderpriority 5 java lang illegalargumentexception invalid node expression dependency groupid not in source plan output sum 3 count clerk 4 orderpriority 5 at com google common base precondition checkargument precondition java 146 at com facebook presto sql planner sanity validatedependencieschecker checkdependencie validatedependencieschecker java 597 at com facebook presto sql planner sanity validatedependencieschecker access 100 validatedependencieschecker java 79 at com facebook presto sql planner sanity validatedependencieschecker visitor visitproject validatedependencieschecker java 237 at com facebook presto sql planner sanity validatedependencieschecker visitor visitproject validatedependencieschecker java 93 at com facebook presto sql planner plan projectnode accept projectnode java 92 at com facebook presto sql planner sanity validatedependencieschecker visitor visitproject validatedependencieschecker java 232 at com facebook presto sql planner sanity validatedependencieschecker visitor visitproject validatedependencieschecker java 93 at com facebook presto sql planner plan projectnode accept projectnode java 92 at com facebook presto sql planner sanity validatedependencieschecker visitor visitproject validatedependencieschecker java 232 at com facebook presto sql planner sanity validatedependencieschecker visitor visitproject validatedependencieschecker java 93 at com facebook presto sql planner plan projectnode accept projectnode java 92 at com facebook presto sql planner sanity validatedependencieschecker visitor visitproject validatedependencieschecker java 232 at com facebook presto sql planner sanity validatedependencieschecker visitor visitproject validatedependencieschecker java 93 at com facebook presto sql planner plan projectnode accept projectnode java 92 at com facebook presto sql planner sanity validatedependencieschecker visitor visitproject validatedependencieschecker java 232 at com facebook presto sql planner sanity validatedependencieschecker visitor visitproject validatedependencieschecker java 93 at com facebook presto sql planner plan projectnode accept projectnode java 92 at com facebook presto sql planner sanity validatedependencieschecker visitor visitoutput validatedependencieschecker java 276 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 validateintermediateplan 1 plansanitychecker java 59 at com google common collect immutablelist foreach immutablelist java 408 at com facebook presto sql planner sanity plansanitychecker validateintermediateplan plansanitychecker java 59 at com facebook presto sql planner logicalplanner plan logicalplanner java 129 at com facebook presto sql planner logicalplanner plan logicalplanner java 122 at com facebook presto execution sqlqueryexecution doanalyzequery sqlqueryexecution java 358 at com facebook presto execution sqlqueryexecution analyzequery sqlqueryexecution java 337 at com facebook presto execution sqlqueryexecution start sqlqueryexecution java 269 at com facebook presto execution queuedexecution lambda start 1 queuedexecution java 62 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 however compute sum or count separately doesn t have any problem sql select grouping orderpriority clerk as group i d sum totalprice as s count as cnt from order group by group set orderpriority clerk clerk
prestodbpresto
max run time be enforce use query create time instead of start execution time
Bug
I think we should enforce query max run time use its start execution time instead of create time the query could be stick in the queue for a while and it would count that time towards the time before kill l552
prestodbpresto
add local round robin exchange before an otherwise source distribute partial aggregation
Enhancement
in case of source distribution driver be create per split every time the driver be close a partial aggregation buffer must be flush this decrease the partial aggregation efficiency
prestodbpresto
wrong result when filter on partition char x or long decimal column
Bug
the follow example be base on testhiveintegrationsmoketest createpartitionedtable create table test partition table string varchar varchar varchar 65535 char char 10 bigint bigint integer integer smallint smallint tinyint tinyint real real double double boolean boolean decimal short decimal 3 2 decimal long decimal 30 10 partition string varchar partition varchar varchar 65535 partition char char 10 partition tinyint tinyint partition smallint smallint partition integer integer partition bigint bigint partition decimal short decimal 3 2 partition decimal long decimal 30 10 with partition by array partition string partition varchar partition char partition tinyint partition smallint partition integer partition bigint partition decimal short partition decimal long insert into test partition table select foo string bar varchar cast boo as char 10 char cast 1 as bigint bigint 2 integer cast 3 as smallint smallint cast 4 as tinyint tinyint cast 123 45 as real real cast 3 14 as double double true boolean cast 3 14 as decimal 3 2 decimal short cast 12345678901234567890 0123456789 as decimal 30 10 decimal long foo partition string bar partition varchar cast boo as char 10 partition char cast 1 as tinyint partition tinyint cast 1 as smallint partition smallint 1 partition integer cast 1 as bigint partition bigint cast 3 14 as decimal 3 2 partition decimal short cast 12345678901234567890 0123456789 as decimal 30 10 partition decimal long run select from test partition table where cast boo as char 10 partition char return 0 row the same be true for filter on the long decimal column e g select from test partition table where cast 12345678901234567890 0123456789 as decimal 30 10 partition decimal long return 0 result filter by the rest of the partition key return correct result
prestodbpresto
plan failure with grouping and expression that require implicit coercion
Bug
sql select group k sum v 1 0 from value 1 1 as t k v group by k fail with com facebook presto sql analyzer semanticexception column k can not be resolve at com facebook presto sql analyzer semanticexceptions missingattributeexception semanticexception java 30 at com facebook presto sql analyzer scope lambda resolvefield 0 scope java 104 at java util optional orelsethrow optional java 290 at com facebook presto sql analyzer scope resolvefield scope java 104 at com facebook presto sql analyzer expressionanalyzer visitor visitidentifi expressionanalyzer java 371 at com facebook presto sql analyzer expressionanalyzer visitor visitidentifi expressionanalyzer java 282 at com facebook presto sql tree identifier accept identifier java 51 at com facebook presto sql tree stackableastvisitor process stackableastvisitor java 26 at com facebook presto sql analyzer expressionanalyzer visitor process expressionanalyzer java 301 at com facebook presto sql analyzer expressionanalyzer visitor visitgroupingoperation expressionanalyzer java 1130 at com facebook presto sql analyzer expressionanalyzer visitor visitgroupingoperation expressionanalyzer java 282 at com facebook presto sql tree groupingoperation accept groupingoperation java 49 at com facebook presto sql tree stackableastvisitor process stackableastvisitor java 26 at com facebook presto sql analyzer expressionanalyzer visitor process expressionanalyzer java 301 at com facebook presto sql analyzer expressionanalyzer analyze expressionanalyzer java 258 at com facebook presto sql analyzer expressionanalyzer analyzeexpression expressionanalyzer java 1447 at com facebook presto sql analyzer expressionanalyzer analyzeexpressionswithsymbol expressionanalyzer java 1400 at com facebook presto sql analyzer expressionanalyzer getexpressiontype expressionanalyzer java 1366 at com facebook presto sql analyzer expressionanalyzer getexpressiontype expressionanalyzer java 1354 at com facebook presto sql analyzer expressionanalyzer getexpressiontype expressionanalyzer java 1342 at com facebook presto sql planner sanity typevalidator visitor visitproject typevalidator java 118 at com facebook presto sql planner sanity typevalidator visitor visitproject typevalidator java 60 at com facebook presto sql planner plan projectnode accept projectnode java 92 at com facebook presto sql planner simpleplanvisitor visitplan simpleplanvisitor java 26 at com facebook presto sql planner sanity typevalidator visitor visitproject typevalidator java 109 at com facebook presto sql planner sanity typevalidator visitor visitproject typevalidator java 60 at com facebook presto sql planner plan projectnode accept projectnode java 92 at com facebook presto sql planner simpleplanvisitor visitplan simpleplanvisitor java 26 at com facebook presto sql planner sanity typevalidator visitor visitproject typevalidator java 109 at com facebook presto sql planner sanity typevalidator visitor visitproject typevalidator java 60 at com facebook presto sql planner plan projectnode accept projectnode java 92 at com facebook presto sql planner simpleplanvisitor visitplan simpleplanvisitor java 26 at com facebook presto sql planner sanity typevalidator visitor visitproject typevalidator java 109 at com facebook presto sql planner sanity typevalidator visitor visitproject typevalidator java 60 at com facebook presto sql planner plan projectnode accept projectnode java 92 at com facebook presto sql planner simpleplanvisitor visitplan simpleplanvisitor java 26 at com facebook presto sql planner simpleplanvisitor visitplan simpleplanvisitor java 19 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 sanity typevalidator validate typevalidator java 57 at com facebook presto sql planner sanity plansanitychecker lambda validateintermediateplan 1 plansanitychecker java 59 at com google common collect immutablelist foreach immutablelist java 408 at com facebook presto sql planner sanity plansanitychecker validateintermediateplan plansanitychecker java 59 at com facebook presto sql planner logicalplanner plan logicalplanner java 129 at com facebook presto sql planner logicalplanner plan logicalplanner java 122 at com facebook presto execution sqlqueryexecution doanalyzequery sqlqueryexecution java 358 at com facebook presto execution sqlqueryexecution analyzequery sqlqueryexecution java 337 at com facebook presto execution sqlqueryexecution start sqlqueryexecution java 269 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 748 if 1 0 be replace with 1 the query succeed I believe this be due to some issue with implicit coercion
prestodbpresto
regular expression failure for certain string
Bug
presto select regexp extract baby k by a z b a z query 20170809 223707 70717 ucc54 fail 6 java lang arrayindexoutofboundsexception 6 at io airlift jcoding multibyteencode safelengthforuptofour multibyteencode java 64 at io airlift jcoding specific nonstrictutf8encode length nonstrictutf8encoding java 30 at io airlift jcoding specific baseutf8encoding mbctocode baseutf8encoding java 91 at io airlift jcoding specific nonstrictutf8encoding mbctocode nonstrictutf8encoding java 22 at io airlift jcoding encode ismbcword encoding java 469 at io airlift joni bytecodemachine opwordbound bytecodemachine java 1063 at io airlift joni bytecodemachine matchat bytecodemachine java 239 at io airlift joni matcher matchcheck matcher java 304 at io airlift joni matcher searchinterruptible matcher java 457 at io airlift joni matcher search matcher java 318 at com facebook presto operator scalar joniregexpfunctions regexpextract joniregexpfunction java 256 at com facebook presto operator scalar joniregexpfunctions regexpextract joniregexpfunction java 242 at com facebook presto gen pageprojection 20170809 223707 70717 ucc54 0 71 270090 project unknown source at com facebook presto gen pageprojection 20170809 223707 70717 ucc54 0 71 270090 project unknown source at com facebook presto operator project pageprocessor positionspageprocessoriterator processbatch pageprocessor java 186 at com facebook presto operator project pageprocessor positionspageprocessoriterator computenext pageprocessor java 132 at com facebook presto operator project pageprocessor positionspageprocessoriterator computenext pageprocessor java 106 at com google common collect abstractiterator trytocomputenext abstractiterator java 145 at com google common collect abstractiterator hasnext abstractiterator java 140 at com facebook presto operator project pageprocessoroutput hasnext pageprocessoroutput java 51 at com facebook presto operator filterandprojectoperator isfinishe filterandprojectoperator java 71 at com facebook presto operator driver processinternal driver java 297 at com facebook presto operator driver lambda processfor 6 driver java 234 at com facebook presto operator driver trywithlock driver java 538 at com facebook presto operator driver processfor driver java 229 at com facebook presto execution sqltaskexecution driversplitrunner processfor sqltaskexecution java 623 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 483 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 748
prestodbpresto
plan failure for non equi leave join
Bug
sql select 1 from order a left join lineitem b on a comment b comment where b comment be not null fail with java lang illegalargumentexception invalid node predicate dependency comment 1 comment not in source plan output comment 1 at com google common base precondition checkargument precondition java 146 at com facebook presto sql planner sanity validatedependencieschecker checkdependencie validatedependencieschecker java 597 at com facebook presto sql planner sanity validatedependencieschecker access 100 validatedependencieschecker java 79 at com facebook presto sql planner sanity validatedependencieschecker visitor visitfilter validatedependencieschecker java 214 at com facebook presto sql planner sanity validatedependencieschecker visitor visitfilter validatedependencieschecker java 93 at com facebook presto sql planner plan filternode accept filternode java 72 at com facebook presto sql planner sanity validatedependencieschecker visitor visitproject validatedependencieschecker java 232 at com facebook presto sql planner sanity validatedependencieschecker visitor visitproject validatedependencieschecker java 93 at com facebook presto sql planner plan projectnode accept projectnode java 92 at com facebook presto sql planner sanity validatedependencieschecker visitor visitexchange validatedependencieschecker java 449 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 visitexchange validatedependencieschecker java 449 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 visitjoin validatedependencieschecker java 307 at com facebook presto sql planner sanity validatedependencieschecker visitor visitjoin validatedependencieschecker java 93 at com facebook presto sql planner plan joinnode accept joinnode java 218 at com facebook presto sql planner sanity validatedependencieschecker visitor visitproject validatedependencieschecker java 232 at com facebook presto sql planner sanity validatedependencieschecker visitor visitproject validatedependencieschecker java 93 at com facebook presto sql planner plan projectnode accept projectnode java 92 at com facebook presto sql planner sanity validatedependencieschecker visitor visitexchange validatedependencieschecker java 449 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 visitoutput validatedependencieschecker java 276 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 140 at com facebook presto sql planner logicalplanner plan logicalplanner java 122 at com facebook presto execution sqlqueryexecution doanalyzequery sqlqueryexecution java 358 at com facebook presto execution sqlqueryexecution analyzequery sqlqueryexecution java 337 at com facebook presto execution sqlqueryexecution start sqlqueryexecution java 269 at com facebook presto execution queuedexecution lambda start 1 queuedexecution java 62 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 the issue doesn t occur if the where clause be remove if the join be convert to an inner join or an equality join this seem to be a recent regression although I haven t track down which commit introduce it
prestodbpresto
space in field name break create table as
Bug
create table as raise an illegal argument exception when space be present in field name create table sql create table if not exist scratch foo as select cat as field with space 2017 08 03 10 14 47 65536 query fail 20170803 141431 21545 jrg8x field end by expect but get with at line 1 optional binary field with 2017 08 03 10 14 47 java lang runtimeexception java lang illegalargumentexception field end by expect but get with at line 1 optional binary field with a temporary solution be to replace space with underscore in the field name sql create table if not exist scratch foo as select cat as field without space 2017 08 03 10 15 04 1 row affect in 13 500ms
prestodbpresto
unclear error message when select from table with empty schema
Bug
I m use the mongodb connector to read datum from mongodb in the beginning presto infer an empty schema because my table didn t have any datum in it at that time however even after add datum simple query would continue to fail with a rather strange and uninformative error message presto stuff select from table query 20170803 032644 00003 2kmi5 fail line 1 8 select not allow in query without from clause com facebook presto sql analyzer semanticexception line 1 8 select not allow in query without from clause manually update the schema in the schema table solve the issue and the query work as expect however this error message be still strange I m not very familiar with presto so I would like to know if this be a bug or if it be intend if it be intend why
prestodbpresto
insert datum into real column in postgresql table via presto result in wrong datum in table
Bug
to reproduce configure presto to connect psql instance on psql psql create table ftestpg a real d double precision on presto presto insert into ftestpg value real 1 0 1 0 presto select from ftestpg a d 1 06535322e9 1 0 the reason for that behaviour be that decision how insert be perform to sql connector be make in many case just base on presto container type and not actual sql type in jdbcrecordsink in case of real appendlong method be call which result in statement setlong be call on prepared statement while setfloat should have be there be high chance that the problem be present also for some other sql type the code of append method should explicitly check for sql type of handle column and perform logic base on it the default branch should just throw exception unsupported sql type
prestodbpresto
allow empty password in presto jdbc
Bug
jdbc password should be allow to be empty l108 but this code wrongly force password presence check l135 background presto jdbc before 0 180 have ignore jdbc password property so we be use username property for authentication e g by embed some api key so we have be use presto jdbc with ssl username api key empty password
prestodbpresto
approx percentile with percentage array fail when use as window function
Bug
presto select approx percentile 42 array 0 5 over query 20170720 165839 00007 qt844 fail com facebook presto spi function windowindex getobject ii lcom facebook presto spi block block java lang nosuchmethoderror com facebook presto spi function windowindex getobject ii lcom facebook presto spi block block at com facebook presto gen array bigint bigintarray double approxpercentileaccumulator 70 addinput unknown source at com facebook presto operator window aggregatewindowfunction accumulate aggregatewindowfunction java 81 at com facebook presto operator window aggregatewindowfunction processrow aggregatewindowfunction java 71 at com facebook presto operator window windowpartition processnextrow windowpartition java 108 at com facebook presto operator windowoperator extractoutput windowoperator java 439 at com facebook presto operator windowoperator getoutput windowoperator java 395 at com facebook presto operator driver processinternal driver java 300 at com facebook presto operator driver lambda processfor 6 driver java 234 at com facebook presto operator driver trywithlock driver java 538 at com facebook presto operator driver processfor driver java 229 at com facebook presto execution sqltaskexecution driversplitrunner processfor sqltaskexecution java 623 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 478 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
prestodbpresto
symbolsextractor doesn t correctly extract all symbol from joinnode
Enhancement
check diff f35aac8ae02c212c0868dc5ccb916327r213 to see how symbol dependency from join node should be extract symbolsextractor need to correctly extract all symbol from join node probably there be mode nodes e g with assignment where not all symbol be extract in fact symbolsextractor should probably be refactore so that method name be more explicit in what context to use they e g extractdependencie extractsubtreesymbol and so on fyi kokose
prestodbpresto
preserve symbol require by join during partial aggregation pushdown
Bug
partial aggregation need to produce symbol requrie by join equi condition and filter expression fix
prestodbpresto
partialaggregationpushdown do not preserve symbol require by join filter and equi condition
Bug
select order custkey as custkey order orderstatus as orderstatus from order join lineitem on lineitem orderkey order orderkey and lineitem orderkey order orderkey group by order custkey order orderstatus output cause by java lang illegalargumentexception invalid node expression dependency orderkey not in source plan output custkey orderstatus hashvalue 17 at com google common base precondition checkargument precondition java 146 at com facebook presto sql planner sanity validatedependencieschecker checkdependencie validatedependencieschecker java 597 at com facebook presto sql planner sanity validatedependencieschecker access 100 validatedependencieschecker java 79 at com facebook presto sql planner sanity validatedependencieschecker visitor visitproject validatedependencieschecker java 237 at com facebook presto sql planner sanity validatedependencieschecker visitor visitproject validatedependencieschecker java 93
prestodbpresto
temporary table leave after insert into mysql table fail
Bug
hi I find a bug to implement jdbc insert into it be like this when the mysql character set be latin1 cp1252 west european I execute the insert statement insert into test1 value cast ver 1 3 as varchar 100 I get the follow error query 20170718 012821 00019 yucvr fail incorrect string value xe8 xb4 xb5 xe9 x98 xb3 for column user addr name at row 1 after a period of time there be many temporary table 2017 07 18 09 40 57
prestodbpresto
more convenient matching for identity projection
Enhancement
currently use planmatchpattern on projectnode that have identity projection one write match strictproject immutablemap of b expression b strictproject immutablemap of b expression b value a b it would be more convenient to have a direct way to ask for identity projection similar to assignment identity
prestodbpresto
analysis error in query involve group and implicit coercion
Bug
sql select 1 0 count group x from value 1 t x group by group set x fail with com facebook presto sql analyzer semanticexception column x can not be resolve at com facebook presto sql analyzer semanticexceptions missingattributeexception semanticexception java 30 at com facebook presto sql analyzer scope lambda resolvefield 0 scope java 104 at java util optional orelsethrow optional java 290 at com facebook presto sql analyzer scope resolvefield scope java 104 at com facebook presto sql analyzer expressionanalyzer visitor visitidentifi expressionanalyzer java 371 at com facebook presto sql analyzer expressionanalyzer visitor visitidentifi expressionanalyzer java 282 at com facebook presto sql tree identifier accept identifier java 51 at com facebook presto sql tree stackableastvisitor process stackableastvisitor java 26 at com facebook presto sql analyzer expressionanalyzer visitor process expressionanalyzer java 301 at com facebook presto sql analyzer expressionanalyzer visitor visitgroupingoperation expressionanalyzer java 1130 at com facebook presto sql analyzer expressionanalyzer visitor visitgroupingoperation expressionanalyzer java 282 at com facebook presto sql tree groupingoperation accept groupingoperation java 49 at com facebook presto sql tree stackableastvisitor process stackableastvisitor java 26 at com facebook presto sql analyzer expressionanalyzer visitor process expressionanalyzer java 301 at com facebook presto sql analyzer expressionanalyzer analyze expressionanalyzer java 258 at com facebook presto sql analyzer expressionanalyzer analyzeexpression expressionanalyzer java 1447 at com facebook presto sql analyzer expressionanalyzer analyzeexpressionswithsymbol expressionanalyzer java 1400 at com facebook presto sql analyzer expressionanalyzer getexpressiontype expressionanalyzer java 1366 at com facebook presto sql analyzer expressionanalyzer getexpressiontype expressionanalyzer java 1354 at com facebook presto sql analyzer expressionanalyzer getexpressiontype expressionanalyzer java 1342 at com facebook presto sql planner sanity typevalidator visitor visitproject typevalidator java 118 at com facebook presto sql planner sanity typevalidator visitor visitproject typevalidator java 60 at com facebook presto sql planner plan projectnode accept projectnode java 92 at com facebook presto sql planner simpleplanvisitor visitplan simpleplanvisitor java 26 at com facebook presto sql planner sanity typevalidator visitor visitproject typevalidator java 109 at com facebook presto sql planner sanity typevalidator visitor visitproject typevalidator java 60 at com facebook presto sql planner plan projectnode accept projectnode java 92 at com facebook presto sql planner simpleplanvisitor visitplan simpleplanvisitor java 26 at com facebook presto sql planner sanity typevalidator visitor visitproject typevalidator java 109 at com facebook presto sql planner sanity typevalidator visitor visitproject typevalidator java 60 at com facebook presto sql planner plan projectnode accept projectnode java 92 at com facebook presto sql planner simpleplanvisitor visitplan simpleplanvisitor java 26 at com facebook presto sql planner sanity typevalidator visitor visitproject typevalidator java 109 at com facebook presto sql planner sanity typevalidator visitor visitproject typevalidator java 60 at com facebook presto sql planner plan projectnode accept projectnode java 92 at com facebook presto sql planner simpleplanvisitor visitplan simpleplanvisitor java 26 at com facebook presto sql planner simpleplanvisitor visitplan simpleplanvisitor java 19 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 sanity typevalidator validate typevalidator java 57 at com facebook presto sql planner sanity plansanitychecker lambda validateintermediateplan 1 plansanitychecker java 60 at com google common collect immutablelist foreach immutablelist java 408 at com facebook presto sql planner sanity plansanitychecker validateintermediateplan plansanitychecker java 60 at com facebook presto sql planner logicalplanner plan logicalplanner java 128 at com facebook presto sql planner logicalplanner plan logicalplanner java 121 at com facebook presto execution sqlqueryexecution doanalyzequery sqlqueryexecution java 312 at com facebook presto execution sqlqueryexecution analyzequery sqlqueryexecution java 291 at com facebook presto execution sqlqueryexecution start sqlqueryexecution java 247 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 748 it doesn t happen if 1 0 be remove or count be explicitly cast to double before multiply it which make I think this be a issue with implicit coercion
prestodbpresto
explain for join fail on hive when partition by contain ts column
Bug
step to reproduce 1 create a table with timestamp column which be partition key create table ts table a bigint ts timestamp with partition by array ts 2 insert any datum into such table do not reproduce when table be empty insert into ts table value 1 cast current time as timestamp 3 create any other table doesn t have to contain ts column create table other table a bigint 4 try to join both table ts column doesn t have to be include in the join criterion presto default explain select ts table other table from ts table other table where ts table a other table a query 20170713 202815 00064 etzv2 fail index 1 must be less than size 1
prestodbpresto
jsonmappingexception no serializer find for class java util concurrent timeoutexception
Bug
rest v1 node endpoint return internal server error due to jakson serialization problem curl I localhost 8080 v1 node http 1 1 500 internal server error date sun 09 jul 2017 21 20 14 gmt content type text plain content length 6714 com fasterxml jackson databind jsonmappingexception no serializer find for class java util concurrent timeoutexception and no property discover to create beanserializer to avoid exception disable serializationfeature fail on empty bean through reference chain com google common collect value 6 com facebook presto failuredetector stat lastfailureexception at com fasterxml jackson databind jsonmappingexception from jsonmappingexception java 275 at com fasterxml jackson databind serializerprovider mappingexception serializerprovider java 1109 at com fasterxml jackson databind serializerprovider reportmappingproblem serializerprovider java 1134 at com fasterxml jackson databind ser impl unknownserializer failforempty unknownserializer java 69 at com fasterxml jackson databind ser impl unknownserializer serialize unknownserializer java 32 at com fasterxml jackson databind ser beanpropertywriter serializeasfield beanpropertywriter java 693 at com fasterxml jackson databind s std beanserializerbase serializefield beanserializerbase java 690 at com fasterxml jackson databind ser beanserializer serialize beanserializer java 155 at com fasterxml jackson databind ser std collectionserializer serializecontentsusing collectionserializer java 176 at com fasterxml jackson databind ser std collectionserializer serializecontent collectionserializer java 120 at com fasterxml jackson databind ser std collectionserializer serialize collectionserializer java 112 at com fasterxml jackson databind ser std collectionserializer serialize collectionserializer java 25 at com fasterxml jackson databind ser defaultserializerprovider serializevalue defaultserializerprovider java 416 at com fasterxml jackson databind objectwriter prefetch serialize objectwriter java 1416 at com fasterxml jackson databind objectwriter writevalue objectwriter java 940 at io airlift jaxrs jsonmapper writeto jsonmapper java 233 at org glassfish jersey message internal writerinterceptorexecutor terminalwriterinterceptor invokewriteto writerinterceptorexecutor java 265 at org glassfish jersey message internal writerinterceptorexecutor terminalwriterinterceptor aroundwriteto writerinterceptorexecutor java 250 at org glassfish jersey message internal writerinterceptorexecutor proceed writerinterceptorexecutor java 162 at org glassfish jersey server internal jsonwithpaddinginterceptor aroundwriteto jsonwithpaddinginterceptor java 106 at org glassfish jersey message internal writerinterceptorexecutor proceed writerinterceptorexecutor java 162 at org glassfish jersey server internal mappableexceptionwrapperinterceptor aroundwriteto mappableexceptionwrapperinterceptor java 86 at org glassfish jersey message internal writerinterceptorexecutor proceed writerinterceptorexecutor java 162 at org glassfish jersey message internal messagebodyfactory writeto messagebodyfactory java 1130 at org glassfish jersey server serverruntime responder writeresponse serverruntime java 711 at org glassfish jersey server serverruntime responder processresponse serverruntime java 444 at org glassfish jersey server serverruntime responder process serverruntime java 434 at org glassfish jersey server serverruntime 2 run serverruntime java 329 at org glassfish jersey internal error 1 call error java 271 at org glassfish jersey internal error 1 call error java 267 at org glassfish jersey internal error process error java 315 at org glassfish jersey internal error process error java 297 at org glassfish jersey internal error process error java 267 at org glassfish jersey process internal requestscope runinscope requestscope java 317 at org glassfish jersey server serverruntime process serverruntime java 305 at org glassfish jersey server applicationhandler handle applicationhandler java 1154 at org glassfish jersey servlet webcomponent serviceimpl webcomponent java 473 at org glassfish jersey servlet webcomponent service webcomponent java 427 at org glassfish jersey servlet servletcontainer service servletcontainer java 388 at org glassfish jersey servlet servletcontainer service servletcontainer java 341 at org glassfish jersey servlet servletcontainer service servletcontainer java 228 at org eclipse jetty servlet servletholder handle servletholder java 845 at org eclipse jetty servlet servlethandler cachedchain dofilter servlethandler java 1689 at io airlift http server tracetokenfilter dofilter tracetokenfilter java 63 at org eclipse jetty servlet servlethandler cachedchain dofilter servlethandler java 1676 at io airlift http server timingfilter dofilter timingfilter java 52 at org eclipse jetty servlet servlethandler cachedchain dofilter servlethandler java 1676 at org eclipse jetty servlet servlethandler dohandle servlethandler java 581 at org eclipse jetty server handler scopedhandler handle scopedhandler java 143 at org eclipse jetty server handler gzip gziphandler handle gziphandler java 462 at org eclipse jetty server handler contexthandler dohandle contexthandler java 1182 at org eclipse jetty servlet servlethandler doscope servlethandler java 511 at org eclipse jetty server handler contexthandler doscope contexthandler java 1112 at org eclipse jetty server handler scopedhandler handle scopedhandler java 141 at org eclipse jetty server handler handlercollection handle handlercollection java 119 at org eclipse jetty server handler statisticshandler handle statisticshandler java 169 at org eclipse jetty server handler handlerlist handle handlerlist java 52 at org eclipse jetty server handler handlerwrapper handle handlerwrapper java 134 at org eclipse jetty server server handle server java 523 at org eclipse jetty server httpchannel handle httpchannel java 320 at org eclipse jetty server httpconnection onfillable httpconnection java 251 at org eclipse jetty io abstractconnection readcallback succeed abstractconnection java 273 at org eclipse jetty io fillinterest fillable fillinterest java 95 at org eclipse jetty io selectchannelendpoint 2 run selectchannelendpoint java 93 at org eclipse jetty util thread strategy executeproduceconsume executeproduceconsume executeproduceconsume java 303 at org eclipse jetty util thread strategy executeproduceconsume produceconsume executeproduceconsume java 148 at org eclipse jetty util thread strategy executeproduceconsume run executeproduceconsume java 136 at org eclipse jetty util thread queuedthreadpool runjob queuedthreadpool java 671 at org eclipse jetty util thread queuedthreadpool 2 run queuedthreadpool java 589 at java lang thread run thread java 745
prestodbpresto
unable to use correlate symbol in have clause
Bug
select select avg totalprice from order group by custkey orderdate have avg totalprice a from value 900 t a query 20170708 154529 00025 r9p5s fail line 1 95 avg totalprice a must be an aggregate expression or appear in group by clause
prestodbpresto
major performance regression in partitionedoutputoperator between 0 173 and 0 174
Bug
our benchmarking show a regression in performance between 0 173 and 0 174 and after much analysis the regression seem to be solely in the partitionedoutputoperator for example in tpch q5 we see stage 6 we see addinputwall increase from 1 17 second to 1 21 minute
prestodbpresto
add support for left right inner lateral join
Enhancement
it should be possible to write query like sql select from t leave join lateral u on sql select from t leave join unnest t a u on
prestodbpresto
fix statement resource handling of zero size page
Bug
if page getsizeinbyte be zero the page may not be return to the client the only know case when this happen be if the page contain only slicearrayblock and all value be null
prestodbpresto
operator be not work correctly in presto for decimal value
Bug
I connect hive with presto and query a table contain decimal value in case of operator it s show I all the row of the table below be the create table and load query for hive create table decimaloperatorcheck name string id decimal 10 2 row format delimit field terminate by load data load datum local inpath home hduser file decimaldata csv into table decimaloperatorcheck query in presto cli select from decimaloperatorcheck where ids 12345 56 output presto default select from decimaloperatorcheck where ids 12345 56 name ids justin 11 90 josh 233 34 alex 123 45 ryan 12345 56 4 row here be the csv use for loading datum datum txt
prestodbpresto
query fail with newmemoryreservation be negative
Bug
java lang illegalargumentexception newmemoryreservation be negative at com google common base precondition checkargument precondition java 122 at com facebook presto operator operatorcontext setmemoryreservation operatorcontext java 306 at com facebook presto operator aggregationoperator addinput aggregationoperator java 168 at com facebook presto operator driver processinternal driver java 309 at com facebook presto operator driver lambda processfor 6 driver java 234 at com facebook presto operator driver trywithlock driver java 541 at com facebook presto operator driver processfor driver java 229 at com facebook presto execution sqltaskexecution driversplitrunner processfor sqltaskexecution java 623 at com facebook presto execution executor prioritizedsplitrunner process prioritizedsplitrunner java 162 at com facebook presto execution executor taskexecutor taskrunner run taskexecutor java 463 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 748
prestodbpresto
fix error handling of rle filter and projection
Bug
when an error occur in the filter or project expression we would throw a verifyexception instead of the actual exception
prestodbpresto
fix error handling of rle block projection and filter
Bug
com google common base verifyexception com google common base verify verify verify java 99 com facebook presto operator project dictionaryawarepageprojection project dictionaryawarepageprojection java 79
prestodbpresto
explain plan print fail for a hive table partition by timestmp or date
Bug
explain give error for a table partitone by timestamp create external table test table account i d bigint account type string account number bigint partition by business eff dt timestamp store as orc location s3 fimt fpphistory dev content table datum temp load test table tblpropertie orc compress zlib this be the stack I get when I run explain presto default explain select from test table query 20170622 135942 00034 dwh5v fail index 1 must be less than size 1 java lang indexoutofboundsexception index 1 must be less than size 1 at com google common base precondition checkelementindex precondition java 1177 at com google common base precondition checkelementindex precondition java 1159 at com google common collect singletonimmutablelist get singletonimmutablelist java 41 at com facebook presto sql functioninvoker invoke functioninvoker java 67 at com facebook presto sql functioninvoker invoke functioninvoker java 43 at com facebook presto sql planner planprinter casttovarchar planprinter java 1376 at com facebook presto sql planner planprinter access 700 planprinter java 146 at com facebook presto sql planner planprinter visitor lambda formatdomain 15 planprinter java 1293 at com facebook presto spi predicate sortedrangeset 2 consume sortedrangeset java 220 at com facebook presto sql planner planprinter visitor formatdomain planprinter java 1288 at com facebook presto sql planner planprinter visitor printconstraint planprinter java 1274 at com facebook presto sql planner planprinter visitor printtablescaninfo planprinter java 1036 at com facebook presto sql planner planprinter visitor visittablescan planprinter java 909 at com facebook presto sql planner planprinter visitor visittablescan planprinter java 620 at com facebook presto sql planner plan tablescannode accept tablescannode java 135 at com facebook presto sql planner planprinter visitor processchildren planprinter java 1247 at com facebook presto sql planner planprinter visitor visitexchange planprinter java 1189 at com facebook presto sql planner planprinter visitor visitexchange planprinter java 620 at com facebook presto sql planner plan exchangenode accept exchangenode java 195 at com facebook presto sql planner planprinter visitor processchildren planprinter java 1247 at com facebook presto sql planner planprinter visitor visitoutput planprinter java 1077 at com facebook presto sql planner planprinter visitor visitoutput planprinter java 620 at com facebook presto sql planner plan outputnode accept outputnode java 82 at com facebook presto sql planner planprinter planprinter java 167 at com facebook presto sql planner planprinter planprinter java 154 at com facebook presto sql planner planprinter textlogicalplan planprinter java 191 at com facebook presto sql analyzer queryexplainer getplan queryexplainer java 95 at com facebook presto sql rewrite explainrewrite visitor getqueryplan explainrewrite java 126 at com facebook presto sql rewrite explainrewrite visitor visitexplain explainrewrite java 104 at com facebook presto sql rewrite explainrewrite visitor visitexplain explainrewrite java 60 at com facebook presto sql tree explain accept explain java 80 at com facebook presto sql tree astvisitor process astvisitor java 27 at com facebook presto sql rewrite explainrewrite rewrite explainrewrite java 57 at com facebook presto sql rewrite statementrewrite rewrite statementrewrite java 51 at com facebook presto sql analyzer analyzer analyze analyzer java 65 at com facebook presto sql analyzer analyzer analyze analyzer java 60 at com facebook presto execution sqlqueryexecution doanalyzequery sqlqueryexecution java 296 at com facebook presto execution sqlqueryexecution analyzequery sqlqueryexecution java 282 at com facebook presto execution sqlqueryexecution start sqlqueryexecution java 238 at com facebook presto execution queuedexecution lambda start 1 queuedexecution java 62 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 748 this look like its happen for a timestamp or date partition table I try on a table without partition table and another table with string partition and both work fine without issue note the table be hive table store as orc access in presto via the hive connector
prestodbpresto
try map array null array x fail
Bug
the query below fail select try map array null array x from value 1 2 t x with error stack trace java lang illegalstateexception expect current entry to be close but be open at com facebook presto spi block mapblockbuilder beginblockentry mapblockbuilder java 152 at com facebook presto spi block mapblockbuilder beginblockentry mapblockbuilder java 29 at com facebook presto operator scalar mapconstructor createmap mapconstructor java 105 at com facebook presto gen pageprojection 90585 try 0 unknown source at com facebook presto gen pageprojection 90585 project unknown source at com facebook presto gen pageprojection 90585 project unknown source at com facebook presto operator project dictionaryawarepageprojection project dictionaryawarepageprojection java 97 at com facebook presto operator project pageprocessor positionspageprocessoriterator processbatch pageprocessor java 179 at com facebook presto operator project pageprocessor positionspageprocessoriterator computenext pageprocessor java 125 at com facebook presto operator project pageprocessor positionspageprocessoriterator computenext pageprocessor java 99 at com google common collect abstractiterator trytocomputenext abstractiterator java 145 at com google common collect abstractiterator hasnext abstractiterator java 140 at com facebook presto operator project pageprocessoroutput hasnext pageprocessoroutput java 51 at com facebook presto operator filterandprojectoperator isfinishe filterandprojectoperator java 71 at com facebook presto operator driver processinternal driver java 300 at com facebook presto operator driver lambda processfor 6 driver java 234 at com facebook presto operator driver trywithlock driver java 537 at com facebook presto operator driver processfor driver java 229 at com facebook presto execution sqltaskexecution driversplitrunner processfor sqltaskexecution java 623 at com facebook presto execution executor prioritizedsplitrunner process prioritizedsplitrunner java 162 at com facebook presto execution executor taskexecutor taskrunner run taskexecutor java 463 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 748 this sequence of event explain the root cause certain function mostly function that return array map use a feature in the presto function framework call instancefactory to avoid repeat allocation of blockbuilder s and to avoid the burden of estimate the size of the allocation when a function fail it leave the blockbuilder in a broken state the exception be catch by try as a result the function will be invoke again when the function get invoke again it use the broken blockbuilder and fail to fix this some of the function use byte code generate work with try catch in byte code generation be hard make thing bad presto almost exclusively use stack to maintain intermediate during byte code generation it doesn t use local variable stack be completely drop by jvm before a catch block be execute in addition we don t really want to handle this in every function implementation that be error prone and burdensome for future function add a try catch to projection filter processor to reset the instance a function maintain such processor be also generate and the above mention complexity apply reset the instance s also carry a cost revamp the way exception that can be catch by try be throw so that they don t actually throw a java exception instead use a pass in object to track exception far require that all function make sure that state be leave in a good state the last fix be the one we would like it be not a straightforward fix as a result we would settle for a quick temporary mitigation this doesn t fix the issue but would get we a more deterministic behavior throw an exception use error code generic internal error from function that use blockbuilder s as intermediate state so that it can t be catch by try add test for this and improve function test framework to enable such test we consider use a special error code but after discussion with martint we decide to go with generic internal error for now
prestodbpresto
add lzop support to the new parquet reader
Enhancement
see issue 8290 5107 be the pr that I add the lzo support to parquet since aircompressor already handle lzop it shouldn t be that difficult to add it in a similar way
prestodbpresto
number of split for intermediate stage in cli show incorrect value
Bug
there two related problem 1 the number of run intermediate split go up and down throughout the execution of the query this cause the progress bar to move forward and backward since the chevron section of the bar depend on how many split be run at a give point in time 2 in case where most leaf split be do and the query be wait on straggler intermediate stage show 0 split run this cause overall progress to show a misleading number since the intermediate split be be count towards the total number of split to be complete I believe this may be happen because run state for intermediate split no long count split that be block we need to fix the counter so that it reflect both I e split schedule on worker instead of just split be schedule on a cpu 46 20 32 4 m rows 3 01 gb 11 7k rows s 1 11 mb s 18 stage row row s bytes bytes s queue run do 0 r 0 0 0b 0b 0 0 0 1 r 0 0 0b 0b 0 0 0 2 r 56 6 m 20 3k 7 1 g 2 61 m 0 0 0 3 r 32 4 m 11 7k 3 01 g 1 11 m 0 1 489
prestodbpresto
column name resolution issue
Bug
I ve find follow issue regard column name resolution when switch from version 0 158 to 0 178 use version 0 158 this query select catalog schema table column from catalog schema table group by column order by catalog schema table column asc work fine use v 0 178 I ve get query 20170613 104018 34104 v6755 fail line 1 95 column catalog schema table column can not be resolve it seem to be a problem with expressionanalyzer that have change over those version stacktrace for this query com facebook presto sql analyzer semanticexception line 1 95 column catalog schema table column can not be resolve at com facebook presto sql analyzer semanticexceptions missingattributeexception semanticexception java 30 at com facebook presto sql analyzer expressionanalyzer visitor visitdereferenceexpression expressionanalyzer java 399 at com facebook presto sql analyzer expressionanalyzer visitor visitdereferenceexpression expressionanalyzer java 282 at com facebook presto sql tree dereferenceexpression accept dereferenceexpression java 53 at com facebook presto sql tree stackableastvisitor process stackableastvisitor java 26 at com facebook presto sql analyzer expressionanalyzer visitor process expressionanalyzer java 301 at com facebook presto sql analyzer expressionanalyzer analyze expressionanalyzer java 258 at com facebook presto sql analyzer expressionanalyzer analyzeexpression expressionanalyzer java 1441 at com facebook presto sql analyzer expressionanalyzer analyzeexpressionswithsymbol expressionanalyzer java 1394 at com facebook presto sql analyzer expressionanalyzer getexpressiontype expressionanalyzer java 1360 at com facebook presto sql analyzer expressionanalyzer getexpressiontype expressionanalyzer java 1348 at com facebook presto sql analyzer expressionanalyzer getexpressiontype expressionanalyzer java 1336 at com facebook presto sql planner optimization desugaringoptimizer rewriter desugar desugaringoptimizer java 203 at com facebook presto sql planner plan assignment lambda rewrite 1 assignment java 109 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 sql planner plan assignment rewrite assignment java 110 at com facebook presto sql planner optimization desugaringoptimizer rewriter visitproject desugaringoptimizer java 125 at com facebook presto sql planner optimization desugaringoptimizer rewriter visitproject desugaringoptimizer java 77 at com facebook presto sql planner plan projectnode accept projectnode java 92 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 at java util collection 2 tryadvance collection java 4717 at java util collection 2 foreachremaine collection java 4725 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 sql planner plan simpleplanrewriter rewritecontext defaultrewrite simpleplanrewriter java 74 at com facebook presto sql planner plan simpleplanrewriter visitplan simpleplanrewriter java 38 at com facebook presto sql planner optimization desugaringoptimizer rewriter visitplan desugaringoptimizer java 99 at com facebook presto sql planner optimization desugaringoptimizer rewriter visitplan desugaringoptimizer java 77 at com facebook presto sql planner plan planvisitor visitsort planvisitor java 104 at com facebook presto sql planner plan sortnode accept sortnode java 88 at com facebook presto sql planner plan simpleplanrewriter rewritecontext rewrite simpleplanrewriter java 84 at com facebook presto sql planner plan simpleplanrewriter rewritecontext rewrite simpleplanrewriter java 95 at com facebook presto sql planner optimization desugaringoptimizer rewriter visitproject desugaringoptimizer java 124 at com facebook presto sql planner optimization desugaringoptimizer rewriter visitproject desugaringoptimizer java 77 at com facebook presto sql planner plan projectnode accept projectnode java 92 at com facebook presto sql planner plan simpleplanrewriter rewritecontext rewrite simpleplanrewriter java 84 at com facebook presto sql planner plan simpleplanrewriter rewritecontext rewrite simpleplanrewriter java 95 at com facebook presto sql planner optimization desugaringoptimizer rewriter visitproject desugaringoptimizer java 124 at com facebook presto sql planner optimization desugaringoptimizer rewriter visitproject desugaringoptimizer java 77 at com facebook presto sql planner plan projectnode accept projectnode java 92 at com facebook presto sql planner plan simpleplanrewriter rewritecontext rewrite simpleplanrewriter java 84 at com facebook presto sql planner plan simpleplanrewriter rewritecontext rewrite simpleplanrewriter java 95 at com facebook presto sql planner optimization desugaringoptimizer rewriter visitproject desugaringoptimizer java 124 at com facebook presto sql planner optimization desugaringoptimizer rewriter visitproject desugaringoptimizer java 77 at com facebook presto sql planner plan projectnode accept projectnode java 92 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 at java util collection 2 tryadvance collection java 4717 at java util collection 2 foreachremaine collection java 4725 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 sql planner plan simpleplanrewriter rewritecontext defaultrewrite simpleplanrewriter java 74 at com facebook presto sql planner plan simpleplanrewriter visitplan simpleplanrewriter java 38 at com facebook presto sql planner optimization desugaringoptimizer rewriter visitplan desugaringoptimizer java 99 at com facebook presto sql planner optimization desugaringoptimizer rewriter visitplan desugaringoptimizer java 77 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 plan simpleplanrewriter rewritewith simpleplanrewriter java 27 at com facebook presto sql planner optimization desugaringoptimizer optimize desugaringoptimizer java 74 at com facebook presto sql planner logicalplanner plan logicalplanner java 130 at com facebook presto sql planner logicalplanner plan logicalplanner java 121 at com facebook presto execution sqlqueryexecution doanalyzequery sqlqueryexecution java 312 at com facebook presto execution sqlqueryexecution analyzequery sqlqueryexecution java 291 at com facebook presto execution sqlqueryexecution start sqlqueryexecution java 247 at com facebook presto execution queuedexecution lambda start 1 queuedexecution java 62 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
prestodbpresto
plan failure when use grouping and legacy order by true
Bug
presto set session legacy order by true set session presto select group a from value 1 as t a group by a query 20170607 011620 02738 84kx5 fail groupingoperation should have be re write to a functioncall before execution java lang illegalstateexception groupingoperation should have be re write to a functioncall before execution at com google common base precondition checkstate precondition java 444 at com facebook presto sql planner optimization desugaringoptimizer rewriter desugar desugaringoptimizer java 198 at com facebook presto sql planner plan assignment lambda rewrite 1 assignment java 109 at java util stream referencepipeline 3 1 accept referencepipeline java 193 at java util iterator foreachremaine iterator java 116 at java util spliterators iteratorspliterator foreachremaine spliterator java 1801 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 sql planner plan assignment rewrite assignment java 110 at com facebook presto sql planner optimization desugaringoptimizer rewriter visitproject desugaringoptimizer java 125 at com facebook presto sql planner optimization desugaringoptimizer rewriter visitproject desugaringoptimizer java 77 at com facebook presto sql planner plan projectnode accept projectnode java 92 at com facebook presto sql planner plan simpleplanrewriter rewritecontext rewrite simpleplanrewriter java 84 at com facebook presto sql planner plan simpleplanrewriter rewritecontext rewrite simpleplanrewriter java 95 at com facebook presto sql planner optimization desugaringoptimizer rewriter visitproject desugaringoptimizer java 124 at com facebook presto sql planner optimization desugaringoptimizer rewriter visitproject desugaringoptimizer java 77 at com facebook presto sql planner plan projectnode accept projectnode java 92 at com facebook presto sql planner plan simpleplanrewriter rewritecontext rewrite simpleplanrewriter java 84 at com facebook presto sql planner plan simpleplanrewriter rewritecontext rewrite simpleplanrewriter java 95 at com facebook presto sql planner optimization desugaringoptimizer rewriter visitproject desugaringoptimizer java 124 at com facebook presto sql planner optimization desugaringoptimizer rewriter visitproject desugaringoptimizer java 77 at com facebook presto sql planner plan projectnode accept projectnode java 92 at com facebook presto sql planner plan simpleplanrewriter rewritecontext rewrite simpleplanrewriter java 84 at com facebook presto sql planner plan simpleplanrewriter rewritecontext rewrite simpleplanrewriter java 95 at com facebook presto sql planner optimization desugaringoptimizer rewriter visitproject desugaringoptimizer java 124 at com facebook presto sql planner optimization desugaringoptimizer rewriter visitproject desugaringoptimizer java 77 at com facebook presto sql planner plan projectnode accept projectnode java 92 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 at java util collection 2 tryadvance collection java 4717 at java util collection 2 foreachremaine collection java 4725 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 sql planner plan simpleplanrewriter rewritecontext defaultrewrite simpleplanrewriter java 74 at com facebook presto sql planner plan simpleplanrewriter visitplan simpleplanrewriter java 38 at com facebook presto sql planner optimization desugaringoptimizer rewriter visitplan desugaringoptimizer java 99 at com facebook presto sql planner optimization desugaringoptimizer rewriter visitplan desugaringoptimizer java 77 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 plan simpleplanrewriter rewritewith simpleplanrewriter java 27 at com facebook presto sql planner optimization desugaringoptimizer optimize desugaringoptimizer java 74 at com facebook presto sql planner logicalplanner plan logicalplanner java 130 at com facebook presto sql planner logicalplanner plan logicalplanner java 121 at com facebook presto execution sqlqueryexecution doanalyzequery sqlqueryexecution java 312 at com facebook presto execution sqlqueryexecution analyzequery sqlqueryexecution java 291 at com facebook presto execution sqlqueryexecution start sqlqueryexecution java 247 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 748
prestodbpresto
plan failure for order by limit with similar expression
Bug
sql with t as select 1 x 1 y select x y from t order by x y limit 1 query 20170606 002050 01487 rgj4j fail multiple entry with same key expr asc null last and expr asc null last java lang illegalargumentexception multiple entry with same key expr asc null last and expr asc null last at com google common collect immutablemap checknoconflict immutablemap java 186 at com google common collect regularimmutablemap checknoconflictinkeybucket regularimmutablemap java 102 at com google common collect regularimmutablemap fromentryarray regularimmutablemap java 88 at com google common collect immutablemap builder build immutablemap java 359 at com facebook presto sql planner optimization symbolmapper map symbolmapper java 128 at com facebook presto sql planner optimization unaliassymbolreferences rewriter visittopn unaliassymbolreference java 448 at com facebook presto sql planner optimization unaliassymbolreferences rewriter visittopn unaliassymbolreference java 117 at com facebook presto sql planner plan topnnode accept topnnode java 119 at com facebook presto sql planner plan simpleplanrewriter rewritecontext rewrite simpleplanrewriter java 84 at com facebook presto sql planner plan simpleplanrewriter rewritecontext rewrite simpleplanrewriter java 95 at com facebook presto sql planner optimization unaliassymbolreference rewriter visitproject unaliassymbolreference java 403 at com facebook presto sql planner optimization unaliassymbolreference rewriter visitproject unaliassymbolreference java 117 at com facebook presto sql planner plan projectnode accept projectnode java 92 at com facebook presto sql planner plan simpleplanrewriter rewritecontext rewrite simpleplanrewriter java 84 at com facebook presto sql planner plan simpleplanrewriter rewritecontext rewrite simpleplanrewriter java 95 at com facebook presto sql planner optimization unaliassymbolreference rewriter visitproject unaliassymbolreference java 403 at com facebook presto sql planner optimization unaliassymbolreference rewriter visitproject unaliassymbolreference java 117 at com facebook presto sql planner plan projectnode accept projectnode java 92 at com facebook presto sql planner plan simpleplanrewriter rewritecontext rewrite simpleplanrewriter java 84 at com facebook presto sql planner plan simpleplanrewriter rewritecontext rewrite simpleplanrewriter java 95 at com facebook presto sql planner optimization unaliassymbolreference rewriter visitproject unaliassymbolreference java 403 at com facebook presto sql planner optimization unaliassymbolreference rewriter visitproject unaliassymbolreference java 117 at com facebook presto sql planner plan projectnode accept projectnode java 92 at com facebook presto sql planner plan simpleplanrewriter rewritecontext rewrite simpleplanrewriter java 84 at com facebook presto sql planner plan simpleplanrewriter rewritecontext rewrite simpleplanrewriter java 95 at com facebook presto sql planner optimization unaliassymbolreferences rewriter visitoutput unaliassymbolreference java 410 at com facebook presto sql planner optimization unaliassymbolreferences rewriter visitoutput unaliassymbolreference java 117 at com facebook presto sql planner plan outputnode accept outputnode java 82 at com facebook presto sql planner plan simpleplanrewriter rewritewith simpleplanrewriter java 27 at com facebook presto sql planner optimization unaliassymbolreference optimize unaliassymbolreference java 114 at com facebook presto sql planner logicalplanner plan logicalplanner java 129 at com facebook presto sql planner logicalplanner plan logicalplanner java 120 at com facebook presto execution sqlqueryexecution doanalyzequery sqlqueryexecution java 312 at com facebook presto execution sqlqueryexecution analyzequery sqlqueryexecution java 291 at com facebook presto execution sqlqueryexecution start sqlqueryexecution java 247 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
prestodbpresto
test failure due to correlated subquery in in predicate
Bug
testredisdistributedhash testcorrelatedinpredicatesubquerie fail with the follow error java lang assertionerror execution of actual query fail select orderkey clerk in select clerk from order s where s custkey o custkey and s orderkey o orderkey from order o at org testng assert fail assert java 83 at com facebook presto test queryassertion assertquery queryassertion java 86 at com facebook presto test abstracttestqueryframework assertquery abstracttestqueryframework java 117 at com facebook presto test abstracttestqueryframework assertquery abstracttestqueryframework java 112 at com facebook presto test abstracttestquerie testcorrelatedinpredicatesubquerie abstracttestquerie java 7166 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 127 cause by java lang illegalstateexception no mapping for column handle rediscolumnhandle connectorid redis ordinalposition 0 name redis key type varchar 64 mapping null dataformat null formathint null keydecoder true hide true internal false at com google common base precondition checkstate precondition java 518 at com facebook presto redis decoder hash hashredisrowdecoder decoderow hashredisrowdecoder java 58 at com facebook presto redis redisrecordcursor nextrow redisrecordcursor java 184 at com facebook presto redis redisrecordcursor advancenextposition redisrecordcursor java 147 at com facebook presto spi recordpagesource getnextpage recordpagesource java 99 at com facebook presto operator tablescanoperator getoutput tablescanoperator java 262 at com facebook presto operator driver processinternal driver java 303 at com facebook presto operator driver lambda processfor 6 driver java 234 at com facebook presto operator driver trywithlock driver java 537 at com facebook presto operator driver processfor driver java 229 at com facebook presto execution sqltaskexecution driversplitrunner processfor sqltaskexecution java 623 at com facebook presto execution executor prioritizedsplitrunner process prioritizedsplitrunner java 162 at com facebook presto execution executor taskexecutor taskrunner run taskexecutor java 463 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 this seem to be a regression introduce in 98faf69c110b0f7e51b79924fa06aef9ae345a6e
prestodbpresto
unn of collection of row type should produce multiple column
Bug
accord to the spec if the type of the element of the collection pass to unnest be a row type the output of unnest should flatten the field in each row m ii otherwise case 1 if any et j 1 one j ncv be a row type then a for each et j that be a row type I let det j be the degree of et j ii let fn j I 1 one I det j be the name of the i th eld in et j n if et j 1 one j ncv be a row type then let sle j be n j otherwise let sle j be n j ii otherwise let eldt be lateral recqp select sle 1 sle ncv from temp as cn pdclp currently presto return a single column whose type be row presto select from unnest array row a 1 row b 2 col0 field0 a field1 1 field0 b field1 2 2 row
prestodbpresto
wait with lookupsourcefactory destruction until all user finish
Bug
hashbuilderoperator allocate and account memory for lookupsource it wait until partitionedlookupsourcefactory be destroy and then remove the memory from the book this should not happen until memory be actually no long use reference in case of outer join in build side full outer or right outer lookupsourcefactory should not be destroy until lookupouteroperator s be finish close fix 8143
prestodbpresto
memory not account for during right outer join
Bug
step to reproduce 1 in cli execute select from value 1 t a right outer join tpch sf1 order on t a orderkey 2 wait until initial result be already visible but query be still run observe query be still run of course server jvm have increase memory usage by 400 mb for this particular query on my particular laptop reserve memory in web ui show 0 this be because hashbuilderoperator complete and it s memory be un account for once partitionedlookupsourcefactory be destroy which be trigger by lookupouteroperatorfactory close lookupouteroperator continue to use memory allocate and originally account for by hashbuilderoperator but the memory be no long in the book
prestodbpresto
cli doesn t abort query on the server when partial result already show in pager
Bug
step to reproduce 1 in cli execute select from tpch sf1 order 2 wait until initial result be already visible but query be still run 3 press q to quit pager now cli print query abort by user query 20170529 130533 00023 9v5js run 1 node split 20 total 0 do 0 00 0 05 0 row 0b 0 rows s 0b s query abort by user observe query still run on the server query be only kill by fail abandon query if query be kill manually in the ui it end immediately so it look like cli fail to deliver kill to the server
prestodbpresto
do not recurse plan tree when check correlation shallowly
Bug
do not recurse plan tree when check correlation shallowly
prestodbpresto
remove recursive computeifabsent method call
Bug
recursive computeifabsent that modify the same collection may corrupt hashmap see also see discussion r117630317
prestodbpresto
do not support non deterministic sortexpression
Bug
for the follow query select count from customer c1 join customer c2 on c1 nationkey c2 nationkey where c1 custkey random c1 custkey c2 custkey presto return 16000 row instead of 69000 when use sortexpression sortedpositionlink assume that once a filter function return false for one row it must be false for all the the follow row this be not true for non deterministic function
prestodbpresto
fix null handling in sortedpositionlink
Bug
fix for
prestodbpresto
invalid result when fast inequality join true and table contain null value
Bug
presto default create table t3 a bigint b bigint create table presto default insert into t3 value 0 0 0 1 0 null 0 1 insert 4 row presto default set session fast inequality join true set session presto default select from nation n t3 where n regionkey 100 t3 b and n nationkey t3 a nationkey name regionkey comment a b 0 algeria 0 haggle carefully final deposit detect slyly agai 0 1 0 algeria 0 haggle carefully final deposit detect slyly agai 0 0 1 argentina 1 al fox promise slyly accord to the regular account bold request alon 1 1 1 argentina 1 al fox promise slyly accord to the regular account bold request alon 1 2 1 argentina 1 al fox promise slyly accord to the regular account bold request alon 1 3 presto default set session fast inequality join false set session presto default select from nation n t3 where n regionkey 100 t3 b and n nationkey t3 a nationkey name regionkey comment a b 0 algeria 0 haggle carefully final deposit detect slyly agai 0 1 0 algeria 0 haggle carefully final deposit detect slyly agai 0 1 0 algeria 0 haggle carefully final deposit detect slyly agai 0 0 1 argentina 1 al fox promise slyly accord to the regular account bold request alon 1 3 1 argentina 1 al fox promise slyly accord to the regular account bold request alon 1 2 1 argentina 1 al fox promise slyly accord to the regular account bold request alon 1 1 row with null value be part of sortedpositionlink however applylessthanfunction will return false for null row prematurely break join position enumeration this most likely be a release blocker since fast inequality join be true by default fyi pnowojski dain martint
prestodbpresto
print position link sort expression in explain
Enhancement
for query presto tiny explain select o orderkey o orderdate l shipdate from order o join lineitem l on l orderkey o orderkey and l shipdate o orderdate interval 10 day explain before output orderkey orderdate shipdate orderkey bigint orderdate date shipdate date remoteexchange gather orderkey bigint orderdate date shipdate date innerjoin orderkey orderkey 0 and expr 3 shipdate orderkey bigint orderdate date shipdate date scanproject table tpch tpch order sf0 01 originalconstraint true expr 3 date orderkey bigint orderdate date expr 3 orderdate literal interval day to second bigint 864000000 orderkey tpch orderkey orderdate tpch orderdate localexchange hash orderkey 0 orderkey 0 bigint shipdate date remoteexchange repartition orderkey 0 bigint shipdate date tablescan tpch tpch lineitem sf0 01 originalconstraint true orderkey 0 bigint shipdate date orderkey 0 tpch orderkey shipdate tpch shipdate and after output orderkey orderdate shipdate orderkey bigint orderdate date shipdate date remoteexchange gather orderkey bigint orderdate date shipdate date innerjoin orderkey orderkey 0 and expr 3 shipdate orderkey bigint orderdate date shipdate date sortexpression shipdate scanproject table tpch tpch order sf0 01 originalconstraint true expr 3 date orderkey bigint orderdate date expr 3 orderdate literal interval day to second bigint 864000000 orderkey tpch orderkey orderdate tpch orderdate localexchange hash orderkey 0 orderkey 0 bigint shipdate date remoteexchange repartition orderkey 0 bigint shipdate date tablescan tpch tpch lineitem sf0 01 originalconstraint true orderkey 0 bigint shipdate date orderkey 0 tpch orderkey shipdate tpch shipdate
prestodbpresto
improve query parameter handle
Enhancement
currently query parameter be handle in various place across the planner the process be as follow 1 when query be first send to backend it be parse and the parse tree ast be be it then cache for further use 2 ast be reanalyze with parameter index expression binding 3 query plan be rebuild base on analysis and parameter index expression binding parameter node be replace with expression by parameterrewriter the problem with this approach be 1 only ast parse tree can be cache the rest analysis query plan have to be rebuild reanalyze 2 parameterrewriter be use on a point basis extensively across the planner 17 usage place where parameterrewriter be use in planner be often unrelated to query parameter e g in planbuilder the impression be that parameterrewriter and parameter be leak to unrelated code one have to remember about parameter support whenever plan project expression with the goal to cleanup potentially unrelated parameterrewriter usage I be propose the follow refactor 1 analyze execute parameter binding separately from query this will result in parameter index type binding 2 analyze query with parameter index type binding 3 build query plan base on analysis no parameter specific code such query plan can be cache for further use with the same parameter type 4 introduce some kind of parameterdesugarer which would replace parameter nodes witch appropriate constant or expression which can be evaluate to constant the benefit of this approach be 1 query plan can be reuse with parameter of the same type 2 parameterrewriter be not handle explicitly throughout the planner the code significantly simplify this be somehow relate to what do you think rschlussel martint
prestodbpresto
fix create empty table in presto memory
Bug
previously follow scenario would fail create table memory default test a bigint insert into memory default test select nationkey from tpch tiny nation with an error message that table test be not find on a worker it be fix by allow to initialize table on write not as it be before only on create and by move sanity check for detect worker crash to assert expect number of row per worker there be two additional small commit that add support for non default schema
prestodbpresto
prefer undistributed plan for topn and move some rule to iterative optimizer
Enhancement
prefer undistributed plan for topn and to avoid unnecessary additional exchange add new pushtopnthroughunion optimizer this be a follow up worker of previous change with distribute union explain select from select regionkey from nation union all select nationkey from nation t a order by a limit 1 before output a regionkey 9 bigint a regionkey 9 topn 1 by regionkey 9 asc null last regionkey 9 bigint localexchange single regionkey 9 bigint remoteexchange gather regionkey 9 bigint topn 1 by regionkey 9 asc null last regionkey 9 bigint remoteexchange repartition regionkey 9 bigint tablescan tpch tpch nation sf0 01 originalconstraint true regionkey bigint regionkey tpch regionkey tablescan tpch tpch nation sf0 01 originalconstraint true nationkey 2 bigint nationkey 2 tpch nationkey after output a regionkey 9 bigint a regionkey 9 topn 1 by regionkey 9 asc null last regionkey 9 bigint localexchange single regionkey 9 bigint remoteexchange gather regionkey 9 bigint topn 1 by regionkey asc null last regionkey bigint tablescan tpch tpch nation sf0 01 originalconstraint true regionkey bigint regionkey tpch regionkey topn 1 by nationkey 2 asc null last nationkey 2 bigint tablescan tpch tpch nation sf0 01 originalconstraint true nationkey 2 bigint nationkey 2 tpch nationkey maybe we could also leave additional partial topn between localexchange single and remoteexchange gather for high concurrency of the final topn
prestodbpresto
cli should bail out as soon as query fail
Enhancement
I ve observe a case where the web ui indicate the query have fail and the cli mark a stage as fail x but keep print progress and query stat for a while this presumably happen because the coordinator continue to return next link in the response and the cli blindly follow they there be two possible solution to this coordinator should stop produce next link once the query fail an argument against this be that some client might be interested in get the most accurate stat about query execution even after a failure cli should detect the query have fail and abort
prestodbpresto
decrease hash partition count on verifier when re run control
Enhancement
when we have a result mismatch we re run the control query to attempt to see if it s deterministic query be often deterministic base on the number of hash partition so multiple control run produce the same answer but the test run fail since the test cluster often have a small number of machine when re run the control the verifier should look at the default value of the hash partition count session property and decrease it by one assume it s great than one