repository
stringclasses
156 values
issue title
stringlengths
1
1.01k
labels
stringclasses
8 values
body
stringlengths
1
270k
prestodbpresto
cli doesn t reset properly with multi line query in debug mode
Bug
step to reproduce 1 run cli with debug 2 run a multi line query 3 ctrl c the output will look like presto select count from table query 20150924 004635 00285 k9mtd run 88 node 290 split split 1 137 total 807 do 70 98 do cpu time 4 2s total 3 3 m rows s 7 3...
prestodbpresto
exception on cli
Bug
presto show table from raptor system table shard 1 row query 20150922 190632 00002 88uiv finish 1 node split 2 total 2 do 100 00 cpu time 0 0s total 111 row s 3 25 kb s 81 active per node 0 1 parallelism 7 rows s 223b s parallelism 0 1 0 00 1 row 30...
prestodbpresto
password with diactric character be not parse correctly
Enhancement
I have a connector with a password contain the letter via native mysql client I be able to connect with the username and password supply in the property file but prestodb could not access anything
prestodbpresto
duplicate distinctlimitnode in query plan
Bug
when explain distinct limit query the plan look like below there be duplicate distinctlimit in the plan presto orc explain select distinct l orderkey from lineitem limit 10 query plan ...
prestodbpresto
split scheduling cause scalability bottleneck on large cluster
Enhancement
the split scheduler be by far the large consumer of cpu on large active cluster as report by perf 12 32 com facebook presto execution nodescheduler nodeselector computeassignment 10 78 com facebook presto execution nodetaskmap getpartitionedsplitsonnode 2 78 com facebook presto execution nodescheduler n...
prestodbpresto
replace nativecodeloader in shaded hadoop build
Enhancement
hadoop nativecodeloader always log warning about not load the native code and we use some hacky reflection in hadoopnative to make it work it would be clean just replace the class with our own compatible version
prestodbpresto
add support for grant and revoke
Enhancement
add authorization support on the sql front end
prestodbpresto
hive connector sort bucket table not handle correctly
Bug
user on mailing list report that read from a sort bucket table do not work properly topic presto user pjohcrjcbzw we need a test for this case in abstracttesthiveclient
prestodbpresto
npe in raptor shardejector
Bug
com facebook presto spi prestoexception fail to perform metadata operation at com facebook presto raptor metadata databaseshardmanager runtransaction databaseshardmanager java 351 at com facebook presto raptor metadata databaseshardmanager assignshard databaseshardmanager java 290 at...
prestodbpresto
remove equalto from type
Enhancement
equalto do not handle null properly it have be supersede in new code by operator the only code leave that use equalto be typedhistogram streamingindexeddata tuplefilterprocessor arrayintersectfunction rowequaloperator maptype keywrapper typeutil positionequalsposition ...
prestodbpresto
be distinct from do not provide expect result for array contain null
Bug
select array 1 be distinct from array cast null as bigint should return false it fail now
prestodbpresto
groupby shouldn t use equalto
Bug
this query fail because type equalto be use instead of be distinct from in group by however be distinct from as be implement today be not an operator select x from value array 1 0 array 2 0 array cast null as bigint 0 t x y group by x
prestodbpresto
raptor stage directory be not clean up when query fail
Bug
node can accumulate quite a lot of dead staging datum between restart
prestodbpresto
presto worker start to accept request before connector be load
Enhancement
it s rarely happen but we find error that connector catalog or udfs do not exist at the very beginning of worker restart it look like httpserver start start to accept request before plugin be not fully load yet I ve send a bootstrap change request if this pull request be accept loadplugin can be s...
prestodbpresto
filter for information schema fail with uppercase
Bug
select from system information schema column where table schema foo select from system information schema column where table schema runtime and table name foo java lang illegalargumentexception schemaname be not lowercase at com google common base precondition checkargument precon...
prestodbpresto
feature request inmemory temp table support in presto
Enhancement
this be a follow up request from electrum s reply to this post topic presto user 5i480n 1npc create this issue to track development for this task it will be great if presto could provide a way to save output of a query as inmemory temp table something like this from spark dataframe teenager sqlcon...
prestodbpresto
support truncate table
Enhancement
have something like truncate to quickly empty an exist table seem desirable e g note that truncate table name work similarly to delete from table name but particular connector may have a more efficient method to wipe out all datum from a give table than run a generic delete operation that may accept pred...
prestodbpresto
allow create queue with concurrency 0 but queue space 0
Enhancement
attempt to do so currently throw an exception say that maxqueue must be positive
prestodbpresto
add pause information to system runtime nod
Enhancement
relate to 3406 it be useful to know what cause a query to die we would like to know about anything that cause the jvm to pause I e stop run java code one way to accomplish this be a thread that sleep in a loop for 100ms and measure the system nanotime delta if this delta be long than configurab...
prestodbpresto
add start time to system runtime node
Enhancement
this should be a timestamp of when the node start it can be add to the announcement as a property like node version in servermainmodule then pull out in discoverynodemanager and add to prestonode
prestodbpresto
dereference of array in row throw exception in localexecutionplanner
Bug
java assertquery select a col1 1 from value row test row true array 1 map array 1 3 array 2 0 4 0 as t a java lang illegalargumentexception can t create a symbol from a qualified name with prefix at com google common base precondition checkargument precondition java 1...
prestodbpresto
can t concat an array with an empty array
Bug
concat an array with an empty array will fail because we can t cast the empty array to the type of the non empty array presto tiny select array 1 array query 20150727 073421 00004 25tug fail can not cast array to array com facebook presto spi prestoexception can not cast array to array at com...
prestodbpresto
window clause for common window frame
Enhancement
in query with multiple common window frame presto should support the window clause select sum salary over w avg salary over w from empsalary window w as partition by depname order by salary desc
prestodbpresto
add shard checksum to raptor
Enhancement
need to decide what checksum to use possibly multiple xxhash64 sha256 etc use both could allow more frequent verification use the fast one but still have the large checksum for less frequent or manual verification when a problem occur
prestodbpresto
track system memory usage
Enhancement
track all memory use by internally by the presto engine when run a user s query for example buffer in exchange s and sharedbuffer s this can then be use to dynamically adjust the number of task run on a worker or the size of buffer it will also allow we to reduce the default size of resource reserve...
prestodbpresto
cpu time limit for query
Enhancement
we should support cpu time base limit on query similarly to how memory limit work this should go in clustermemorymanager process and work similarly to how the memory limit be enforce you can get the total cpu time for the query from queryexecution getqueryinfo getquerystat but you may want to add...
prestodbpresto
nullpointerexception when use approximate at
Bug
I try to use approximate query but it throw nullpointerexception query be select count from lineitem approximate at 95 0 confidence error message be java lang nullpointerexception at com facebook presto sql planner localexecutionplanner visitor buildaccumulatorfactory localexecutionplanner java ...
prestodbpresto
add topn and topn by
Enhancement
1 implement a custom block base heap like datum structure 2 with the above data structure topn and topn by can be implement without too much work alternative route implement both with single value block if it be immediately need
prestodbpresto
include error location information for unresolved function
Enhancement
query like select 1 1 fail with operator equal bigint varchar not register however the json return from v1 query doesn t include the line number also the error message should include the line number
prestodbpresto
explain fail when partition key be of date time type
Bug
this seem to happen when the domain of the partition be convert to a string because the coercion for those type require a connectorsession to be provide can not convert methodhandle connectorsession long slice to object object java lang invoke wrongmethodtypeexception java lang invoke methodhandle astypeun...
prestodbpresto
type inference break for overloaded function that produce null if any arg be null
Bug
for example presto explain select mod null null query plan output col0 mod bigint col0 mod project mod bigint mod cast null as bigint ...
prestodbpresto
union query fail for unknowntype
Bug
with configuration optimizer optimize hash generation true this query fail value null union value null stack trace com facebook presto spi prestoexception compiler fail and interpreter be disable at com facebook presto sql planner localexecutionplanner visitor visitscanfiltera...
prestodbpresto
add more failure info to querycompletionevent
Enhancement
we need to know the task i d and the machine on which the failure occur this help with find log relate to a failure correlating machine with high than average failure count etc
prestodbpresto
analyzer error when row field reference be use in aggregation query
Bug
the follow query add it to abstracttestquerie select a col0 count from value row test row 1 1 t a fail with an exception instead of a col0 not in group by clause java lang illegalstateexception no field for name a col0 at com google common base precondition checkstate p...
prestodbpresto
bad error message when cast to parametric type without type parameter
Bug
select cast null as map fail with query 20150625 162057 09252 bhbmd fail expect two type java lang illegalargumentexception expect two type at com google common base precondition checkargument precondition java 122 at com facebook presto type mapparametrictype createtype mapparametric...
prestodbpresto
use direct switch for small in list of small primitive
Enhancement
if all of the constant fit in an int less than 2 32 we can switch on the value directly rather than on the hash code this remove both the hash computation of the lookup value and the extra comparison when the hash match l102
prestodbpresto
remove box for in list of primitive
Enhancement
l129
prestodbpresto
support limit all
Enhancement
in some database like postsgresql mysql limit all have the same effect as eliminate the limit clause from a query it return all the row currently it give error in presto that the argument of limit clause must be an integer
prestodbpresto
fix fragment number in explain type distribute
Enhancement
the fragment number do not match the stage number for trivial query they be in the opposite order fix this be a bit more complicated than just munge the number because the plan be a tree
prestodbpresto
topnrownumber optimizer should support composite expression
Enhancement
the follow optimizes correctly sql with t as select x row number over order by x rn from select x from t where rn 10 but these do not sql with t as select x row number over order by x rn from select x from select x from t where rn 10 where rn 5 w...
prestodbpresto
jdbc driver java sql statement setmaxrow not implement
Enhancement
this method doesn t do anything in term of limit the number of row return the implementation should be the same as use the limit clause in sql implement this method be important for gui tool many client tool will use a separate text box where user define the maximum number of row to preview since there be...
prestodbpresto
topnrownumber should support equality
Enhancement
the follow query should both optimize to use topnrownumber sql select x from select x row number over order by x rn from where rn 1 select x from select x row number over order by x rn from where rn 1 currently only the version work there be actuall...
prestodbpresto
add max size set for hive over s3
Enhancement
prestodb note how much data be be read to execute a query the hive adapter can read datum from a remote source such as amazon s3 presto could cancel a query if the total size read reach a configurable limit avoid unwanted cost for complex or poorly optimize query
prestodbpresto
add mechanism to select which plugin be enable at runtime
Enhancement
currently any plugin that s bundle in the presto package be automatically enable at runtime only connector can be mount selectively but every type and function provider be register automatically
prestodbpresto
expose metaphone and soundex method
Enhancement
they may already be shade in some of the hive lib though I m not sure that help all datum source
prestodbpresto
add support for scalar subquerie
Enhancement
scalar sub query be not support for example sql select from nation where nation key select nation key from nation where name algeria limit 1
prestodbpresto
date format use w day of week return incorrect value 1 7 not 0 6
Bug
when use date format with the w specifi for day of week we get incorrect value presto default select date format date parse 2015 05 03 11 00 y m d h I w col0 7 1 row accord to the documentation w day of the week 0 6 where sunday be th...
prestodbpresto
field reference operator do not work for field name with uppercase letter
Bug
the field reference operator should follow the same resolution rule as all other identifier this bug be most likely because rowparametrictype createfunction do not lower case the function name
prestodbpresto
window function in where clause should fail with analysis error
Bug
when fix this we should check other place that window function could erroneously be use presto select from value 1 t x where lag x 1 query 20150415 231524 22369 7mzjt fail compiler fail and interpreter be disabled com facebook presto spi prestoexception compiler fail and interpreter b...
prestodbpresto
add error code to queryerror
Bug
queryerror errorcode be currently always set to 0 it should be set to the correct error code additionally we should add errorname from errorcode name and errortype
prestodbpresto
support offset in select
Enhancement
limit be support be it possible to add offset as well I understand I can do that manually but have native support would be nice the downside of manual paging be more datum transmit over the wire from server to client
prestodbpresto
implement range precede for window function
Enhancement
this query should work sql select sum x over order by x range 1 precede from value 1 1 2 2 t x it currently fail with window frame range precede be only support with unbounded
prestodbpresto
regexp like be n 2
Enhancement
the regexp like function use matcher find and this function apply the pattern at every character instead we should prefix and suffix the pattern with and use match
prestodbpresto
bad error message for invalid type
Bug
presto select cast null as array query 20150225 002641 00750 u2hj3 fail null java lang nullpointerexception at com google common base precondition checknotnull precondition java 210 at com google common collect immutablecollection arraybasedbuilder add immutablecollection java 339 at com go...
prestodbpresto
show stack trace on query detail page in ui
Enhancement
for fail query it would be very useful if the ui could display the stack trace like the cli do when use debug
prestodbpresto
detect quick worker restart and fail query immediately
Bug
when a worker restart the engine may not notice the change and wait for work that will never complete an easy fix for this be to add the node instance i d to task info and then the httpremotetask would see the change and fail the task this issue be identify by have a task stuck in the running state with 0 s...
prestodbpresto
implement hash function
Enhancement
implement a generic hash function that take any number of argument of any type and return the hash of the value as a bigint the type of the hash be system dependent and subject to change between release this function will be useful for thing like bucketing or sample where the result of the hash be not stor...
prestodbpresto
fix use clause for join
Bug
column that appear in a use clause should not require qualification this be particularly useful for outer join because the non qualified reference always reference the non null value it be not clear if qualifying reference be allow postgresql allow it but oracle do not allow it be useful in order to do ...
prestodbpresto
implement xxhash64 function
Enhancement
the function should take varbinary as an argument and return a bigint since we don t have fix size binary type yet or function to operate on they effectively with the 64 bit two s complement interpretation of the little endian representation of the result hash
prestodbpresto
insert should ignore hide column
Bug
when do an insert that do not specify the column list which be not yet support the column list should only be the visible column not hide column thus it should be equivalent to the column return by select from t for example use the tpch connector presto tiny describe region colum...
prestodbpresto
allow valuesnode with 0 row
Enhancement
once this be fix update limitpushdown to create an empty valuesnode instead of a limit 0 on top of a single row valuesnode
prestodbpresto
add option to cli to configure sock proxy
Enhancement
the httpclient in com facebook presto cli queryrunner use a hard code config with no sock proxy support we need to make this configurable via a command line option to the cli
prestodbpresto
add jmx predicate pushdown for node
Enhancement
run a query like this should only generate a split for that specific node sql select from jmx jmx java lang type runtime where node
prestodbpresto
bad error message for hive insert
Bug
the begininsert method in hivemetadata throw unsupportedoperationexception which result in a horrible error message we should support insert but in the mean time the error message should be fix by throw the correct exception java throw new prestoexception not support insert not yet suppo...
prestodbpresto
add optimizer for limit 0
Enhancement
currently the plan a query with limit 0 include all node under the limit this cause presto to start schedule the query and then tear down the query instead the plan nod under a limit 0 node should be replace with an empty value node which will cause the query to complete instantly
prestodbpresto
incorrect plan with nest query involve rand
Bug
the follow query select u from select if rand 0 5 0 1 as u where u u produce the follow incorrect plan output u expr bigint u expr ...
prestodbpresto
add support for hash partition semijoin
Enhancement
semijoin query see example below currently execute use broadcast strategy even if distribute join be enable sql select from t where a in select b from u see l338
prestodbpresto
add memory usage tracking to orcpagesource
Enhancement
read orc datum require large amount so memory which be currently not track by the presto resource system this can lead to worker crash implement this tracking will take a number of change to presto from the top down 1 add a memory resource tracker interface to spi and pass into connectorpagesourceprovi...
prestodbpresto
dynamically adapt hive partition to table schema
Enhancement
hive allow partition to have a different schema than the table and then apply implicit coercion to adapt the partition to the table presto should implement the same behavior before we get go on this I d like to document the coercion hive support we should produce the full matrix of convert all type to every...
prestodbpresto
improve syntax error from parser
Enhancement
this technique seem very applicable to presto
prestodbpresto
json function need categorize error
Bug
this be one example but there might be other the unit test need to include negative test as well see assertinvalidfunction in teststringfunction presto select json extract scalar cause by java lang stringindexoutofboundsexception string index out of range 0
prestodbpresto
bad error message for unhandled
Bug
this be cause by an uncategorized error come from the function which should be fix independently but uncategorized error should not result in a compiler fail error message presto tiny select json extract scalar query 20150109 183146 00009 t36py fail compiler fail and interpreter be disabl...
prestodbpresto
can not select color type
Bug
presto tiny select rgb 0 0 0 2015 01 09t10 24 34 279 0800 debug main com facebook presto cli statusprinter error print status java lang runtimeexception error fetch next at return an invalid response jsonresponse statuscode 200 statusmessage ok header vary accept encode user ...
prestodbpresto
support implicit coercion in value
Enhancement
value 1 2 1 2 3 4 currently fail with query 20150108 110048 00012 j5xif fail value row have mismatch type expect bigint bigint actual double double com facebook presto sql analyzer semanticexception value row have mismatch type expect bigint bigint act...
prestodbpresto
add year of week function
Enhancement
this function should accept a date return the year correspond to the iso week of that date
prestodbpresto
bad error message for great color
Enhancement
the problem be that e must be orderable maybe we should include the type constraint in the error message presto default select great rgb 255 0 0 query 20150105 152051 00033 59tg5 fail unexpected parameter color for function great expect great e
prestodbpresto
combine window operator with same partition and order
Enhancement
window function that share the same partition and ordering can be execute by the same window operator currently each window function be execute in a separate step which require move and sort all the datum again the same operator can be share even if the frame be different this require track the frame per fun...
prestodbpresto
fix wasnull in prestoresultset
Bug
the method currently always return false
prestodbpresto
bad error message for scalar subquery
Bug
presto select select 123 query 20141229 190248 09947 q9qf4 fail not yet implement com facebook presto sql tree subqueryexpression com facebook presto spi prestoexception not yet implement com facebook presto sql tree subqueryexpression at com facebook presto sql planner expressioninterpreter vi...
prestodbpresto
hive connector should verify type when create output handle
Bug
relate to 2128 begincreatetable should verify if the type be support rather than fail much later when actually write the method getjavaobjectinspector in hiverecordsink have a list of all the possibly support type but some output format may not support every type
prestodbpresto
npe when get element from empty literal array
Bug
sql select array 0 query 20141218 193145 15184 8t988 fail methodhandle be null java lang nullpointerexception methodhandle be null at com google common base precondition checknotnull precondition java 226 at com facebook presto operator scalar arraysubscriptoperator specialize arraysu...
prestodbpresto
cast to unknown should not be allow
Bug
unknown be not a valid type it s just a way of say there be a type but it s unknown to the sql engine therefore cast a value to unknown be non sensical and shouldn t be allow presto di select cast null as unknown col0 0 row
prestodbpresto
select null incorrectly produce 0 row
Bug
presto select null col0 0 row presto di explain select null query plan output col0 col0 expr ...
prestodbpresto
indexoutofboundsexception from io airlift tpch textpool
Bug
presto default select sum quantity from tpch sf101 lineitem query 20141215 222017 00006 39zd8 fail 1 node split 5 total 0 do 0 00 cpu time 7 9s total 1 67 m rows s 0b s 96 active per node 2 6 parallelism 4 32 m rows s 0b s parallelism 2 6 0 03 13 1 m rows 0b 4...
prestodbpresto
quote special function don t resolve correctly
Bug
this work presto di select current timestamp col0 2014 12 12 17 59 18 737 america los angeles 1 row but this do not presto di select current timestamp query 20141213 015319 01754 8t988 fail col...
prestodbpresto
add create table if not exist
Enhancement
add the optional if not exist syntax for create table create table if not exist name as
prestodbpresto
row number with limit filter incorrect when filter contain not
Bug
the follow query sql select from select row number over rn from value 0 0 0 0 where not rn 3 produce the follow incorrect output rn 0 row the correct output should be rn 3 4 2 row
prestodbpresto
can not create view if query contain quote table name
Bug
presto create view test as select x from 7day query 20141206 005354 01299 aqkqc fail format query do not parse query querybody queryspecification select select distinct false selectitem x from optional of table 7day where null groupby have null orderby limit null orderby ...
prestodbpresto
implement great as a variable arity function
Enhancement
the current implementation be specific to a few type and only support two argument it should be replace with something like
prestodbpresto
split page if necessary before send they over the network
Bug
page provide by plugin datum source can be arbitrarily sized relative to the maximum http payload size default 16 mb this can cause query failure with com facebook presto operator pagetoolargeexception remote page be too large at com facebook presto operator httppagebufferclient rewriteexception http...
prestodbpresto
distinct fail for json type when optimizehashgeneration true
Bug
sql select distinct cast array 1 as json fail with com facebook presto spi prestoexception unexpected parameter json for function operator hash code expect operator hash code boolean operator hash code bigint operator hash code double operator hash code varchar operato...
prestodbpresto
npe when use max by min by
Bug
java lang nullpointerexception at com facebook presto spi type doubletype compareto doubletype java 72 at com facebook presto operator aggregation maxby combine maxby java 125 at com facebook presto gen varcharvarchardoublemaxbygroupedaccumulator 576 addintermediate unknown source at com f...
prestodbpresto
exception when use non deterministic predicate together with in
Bug
the follow query sql select from value 1 t a where rand 0 and a in value 1 fail with this exception java lang illegalargumentexception only deterministic expression may be consider for rewrite at com google common base precondition checkargument precondition java 122 ...
prestodbpresto
invalid plan when aggregation require implicit coercion
Bug
the follow query sql select min a numeric histogram 10 a from value 1 t a produce this invalid plan output col0 col1 col0 min ...
prestodbpresto
implement pick any aggregation function
Enhancement
we need an aggregation function to pick an arbitrary value from the group this can be commonly do with min or max but those only work for comparable type possible name be arbitrary choose any
prestodbpresto
implement map agg function
Enhancement
the map agg k v map function should be an aggregation that accept a comparable key k and any value v and aggregate all the row into a single map
prestodbpresto
json type can not be write to hive connector
Enhancement
the json type should be write to the hive connector as a string with some additional datum store in the metastore so that the hive connector still know that it s a presto json type
prestodbpresto
improve error message when type don t match in union query
Enhancement
the follow query sql select 1 union select a fail with a cryptic error com facebook presto sql analyzer semanticexception union query term have mismatch column at com facebook presto sql analyzer tupleanalyzer visitunion tupleanalyzer java 373 at com facebook presto sql analyzer tup...
prestodbpresto
make map comparable
Enhancement
map should be consider equal if they contain the same number of key and they be element wise equal ignore key ordering
prestodbpresto
execute use command on the server
Enhancement
the command should be send to the server which should parse validate and return the resolve catalog schema to the client in the same way as session option currently work in progress