repository
stringclasses
156 values
issue title
stringlengths
1
1.01k
labels
stringclasses
8 values
body
stringlengths
1
270k
prestodbpresto
blank padding semantic in comparison and predicate
Bug
follow can be see with current 0 279 version of presto be this design intent or a defect if design intent please improve the documentation to state as such which user can be reference to presto do not return a row when a predicate or comparison have term such as show select from t where a a while various database system db2 oracle snowflake etc will return row if the literal value be define as show row will be return select from t where a a as will case such as select from t where cast a as char 1 a comparison such as follow return row select from t where a a iso sql specification discuss treatment of blank padding when value of unequal length be compare if the collation for the comparison have the no pad characteristic and the short value be equal to some prefix of the long value then the short value be consider less than the long value if the collation for the comparison have the pad space characteristic for the purpose of the comparison the short value be effectively extend to the length of the long by concatenation of s on the right see related issue in trino project
prestodbpresto
native query with groupby rollup give error final aggregation with default value not separate from partial aggregation by remote hash exchange if run with prefer partial aggregation false
Bug
current behavior presto tpch set session prefer partial aggregation true set session presto tpch select linenumber suppkey sum cast quantity as bigint from lineitem group by rollup linenumber suppkey linenumber suppkey col2 2 23 3340 1 6 3561 1 53 3888 3 57 2955 3 34 2645 3 58 2679 1 70 3674 3 14 3123 6 75 1162 3 10 2237 2 5 3271 3 8 3343 2 15 3232 4 72 1875 2 25 3542 5 73 1695 5 9 1559 4 58 2231 4 89 2647 3 87 3105 6 26 1030 5 81 1725 3 76 2651 1 97 4107 query 20230921 064200 00032 mjqrr finish 1 node split 10 total 10 do 100 00 latency client side 339ms server side 318ms 60 2k row 193 kb 189k rows s 607 kb s presto tpch set session prefer partial aggregation false set session presto tpch select linenumber suppkey sum cast quantity as bigint from lineitem group by rollup linenumber suppkey query 20230921 064214 00034 mjqrr fail final aggregation with default value not separate from partial aggregation by remote hash exchange
prestodbpresto
native query with select count distinct fail with no node available to run query if run under spill enable configuration
Bug
expect behavior follow query fail with error no node available to run query when run under a specific configuration strangely though no stack trace be generate for any of the worker assertquery builder test session setsystemproperty use mark distinct false build select count from select orderkey count distinct partkey from lineitem group by orderkey have count distinct partkey cardinality array distinct array agg partkey value 0 configuration use set the follow configuration parameter in the session set session aggregation operator unspill memory limit 128 kb set session task concurrency 2 set session dedup base distinct aggregation spill enable false set session use mark distinct false set the follow property in the config property file experimental spill enable true experimental spiller spill path user mknegi tmp spill experimental spiller max use space threshold 1 0 experimental memory revoke threshold 0 0 experimental memory revoke target 0 0 current behavior cause by com facebook presto spi prestoexception no node available to run query at com facebook presto spi nodemanager getrequiredworkernode nodemanager java 34 at com facebook presto tpch tpchnodepartitioningprovider getbucketnodemap tpchnodepartitioningprovider java 53 at com facebook presto sql planner nodepartitioningmanager getconnectorbucketnodemap nodepartitioningmanager java 223 at com facebook presto sql planner nodepartitioningmanager getbucketnodemap nodepartitioningmanager java 181 at com facebook presto execution scheduler sectionexecutionfactory createstageschedul sectionexecutionfactory java 344 at com facebook presto execution scheduler sectionexecutionfactory createstreaminglinkedstageexecution sectionexecutionfactory java 252 at com facebook presto execution scheduler sectionexecutionfactory createstreaminglinkedstageexecution sectionexecutionfactory java 230 at com facebook presto execution scheduler sectionexecutionfactory createsectionexecution sectionexecutionfactory java 176 at com facebook presto execution scheduler legacysqlqueryscheduler createstageexecution legacysqlqueryscheduler java 355 at com facebook presto execution scheduler legacysqlqueryscheduler legacysqlqueryscheduler java 244 at com facebook presto execution scheduler legacysqlqueryscheduler createsqlqueryscheduler legacysqlqueryscheduler java 173 at com facebook presto execution sqlqueryexecution getscheduler sqlqueryexecution java 633 at com facebook presto execution sqlqueryexecution plandistribution sqlqueryexecution java 614 at com facebook presto execution sqlqueryexecution start sqlqueryexecution java 457 at com facebook presto gen presto null testversion 20230926 100834 1 run unknown source at com facebook presto execution sqlquerymanager createquery sqlquerymanager java 306 at com facebook presto dispatcher localdispatchquery lambda startexecution 8 localdispatchquery java 211 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 750 some excerpt from the worker log not sure if these would lead into the problem eventually i20230926 21 36 33 392150 4725476 taskmanager cpp 549 delete task 20230926 160632 00002 5y8ue 2 0 1 0 i20230926 21 36 33 392419 4726390 prestoexchangesource cpp 224 fetch datum for v1 task 20230926 160632 00002 5y8ue 2 0 3 0 result 1 2 0 byte i20230926 21 36 33 392467 4726390 prestoexchangesource cpp 231 receive buffer complete header for v1 task 20230926 160632 00002 5y8ue 2 0 3 0 result 1 2 i20230926 21 36 33 392499 4726390 prestoexchangesource cpp 289 enqueue empty page for v1 task 20230926 160632 00002 5y8ue 2 0 3 0 result 1 2 i20230926 21 36 33 392565 4726390 prestoexchangesource cpp 383 send abort result v1 task 20230926 160632 00002 5y8ue 2 0 3 0 result 1 i20230926 21 36 33 393939 4726377 prestoexchangesource cpp 224 fetch datum for v1 task 20230926 160632 00002 5y8ue 2 0 0 0 result 1 2 0 byte i20230926 21 36 33 394037 4726377 prestoexchangesource cpp 231 receive buffer complete header for v1 task 20230926 160632 00002 5y8ue 2 0 0 0 result 1 2 i20230926 21 36 33 394083 4726377 prestoexchangesource cpp 289 enqueue empty page for v1 task 20230926 160632 00002 5y8ue 2 0 0 0 result 1 2 i20230926 21 36 33 394424 4726296 prestoexchangesource cpp 383 send abort result v1 task 20230926 160632 00002 5y8ue 2 0 0 0 result 1 i20230926 21 36 33 395223 4726377 prestoexchangesource cpp 383 send abort result v1 task 20230926 160632 00002 5y8ue 2 0 0 0 result 1
prestodbpresto
inconsistent semantic of array sort
Bug
array sort apply to array of complex type with nest null may or may not fail depend on whether the sort logic need to compare the null to decide the order I wonder if this be intentional if so would it make sense to document this behavior presto select array sort array array 1 null array 2 null col0 1 null 2 null 1 row presto select array sort array array 1 null array 1 2 query 20230926 061447 03626 sq8kq fail array contain element not support for comparison cc duanmeng kaikalur tdcmeehan aditi pandit
prestodbpresto
circleci deprecates intel macos in january 2024
Bug
presto use this resource in circleci continue config yml to test presto native execution macos intel macos xcode 14 3 0 resource class maco x86 medium gen2 it s mark as deprecate here announcement start february 1 2024 we will only offer apple silicon base macos resource as previously announce we will be deprecate our gen1 resource on 2 october 2023 we will also be deprecate our dedicated host at this time in january 2024 we will deprecate our gen2 resource end our support for all intel base macos resource job still call these resource class after this will fail with an invalid resource class error
prestodbpresto
clickhouse connector incorrectly transform timestamp constant to datetime literal
Bug
presto clickhouse connector transform a timestamp with time zone constant like from iso8601 timestamp 2023 09 20t00 00 00 09 00 to timestamp 2023 09 19 15 00 00 000 literal in native clickhouse sql timestamp in clickhouse be an alias to the datetime type which doesn t offer sub second precision this lead to a parse error in clickhouse your environment presto version use 0 283 datum source and connector use presto clickhouse deployment cloud or on prem on perm clickhouse server version 23 6 2 a clickhouse table with the follow schema native clickhouse ddl syntax sql create table default t ts datetime value float32 engine mergetree order by ts presto clickhouse connector be configure like this connector name clickhouse clickhouse connection url jdbc clickhouse localhost 8123 clickhouse connection user default expect behavior I expect the follow query to complete without error presto sql sql select count from clickhouse default t where ts from iso8601 timestamp 2023 09 20t00 00 00 09 00 current behavior query return an error query 20230925 102132 00013 842zf fail clickhouse exception code 1002 host localhost port 8123 code 6 db exception can not parse string 2023 09 19 15 00 00 000 as datetime syntax error at position 19 parse just 2023 09 19 15 00 00 while process select count from default t where ts todatetime 2023 09 19 15 00 00 000 can not parse text version 23 6 2 18 official build stacktrace 2023 09 25t19 21 33 041 0900 error splitrunner 15 131 com facebook presto execution executor taskexecutor error processing split 20230925 102132 00013 842zf 1 0 0 0 0 com facebook presto plugin clickhouse clickhousesplit 140367c start 3 9098605869769e7 wall 21 ms cpu 0 ms wait 0 ms call 1 jdbc error clickhouse exception code 1002 host localhost port 8123 code 6 db exception can not parse string 2023 09 19 15 00 00 000 as datetime syntax error at position 19 parse just 2023 09 19 15 00 00 while process select count from default t where ts todatetime 2023 09 19 15 00 00 000 can not parse text version 23 6 2 18 official build 2023 09 25t19 21 33 059 0900 error remote task callback 20 com facebook presto execution stageexecutionstatemachine stage execution 20230925 102132 00013 842zf 1 0 fail com facebook presto spi prestoexception clickhouse exception code 1002 host localhost port 8123 code 6 db exception can not parse string 2023 09 19 15 00 00 000 as datetime syntax error at position 19 parse just 2023 09 19 15 00 00 while process select count from default t where ts todatetime 2023 09 19 15 00 00 000 can not parse text version 23 6 2 18 official build at com facebook presto plugin clickhouse clickhouserecordcursor handlesqlexception clickhouserecordcursor java 236 at com facebook presto plugin clickhouse clickhouserecordcursor clickhouserecordcursor java 95 at com facebook presto plugin clickhouse clickhouserecordset cursor clickhouserecordset java 59 at com facebook presto spi recordpagesource recordpagesource java 40 at com facebook presto split recordpagesourceprovider createpagesource recordpagesourceprovider java 48 at com facebook presto spi connector connectorpagesourceprovider createpagesource connectorpagesourceprovider java 52 at com facebook presto split pagesourcemanager createpagesource pagesourcemanager java 80 at com facebook presto operator tablescanoperator getoutput tablescanoperator java 263 at com facebook presto operator driver processinternal driver java 428 at com facebook presto operator driver lambda processfor 9 driver java 311 at com facebook presto operator driver trywithlock driver java 732 at com facebook presto operator driver processfor driver java 304 at com facebook presto execution sqltaskexecution driversplitrunner processfor sqltaskexecution java 1079 at com facebook presto execution executor prioritizedsplitrunner process prioritizedsplitrunner java 165 at com facebook presto execution executor taskexecutor taskrunner run taskexecutor java 603 at com facebook presto gen presto 0 283 1fa586a 20230925 100436 1 run unknown source at java base java util concurrent threadpoolexecutor runworker threadpoolexecutor java 1128 at java base java util concurrent threadpoolexecutor worker run threadpoolexecutor java 628 at java base java lang thread run thread java 829 cause by ru yandex clickhouse except clickhouseunknownexception clickhouse exception code 1002 host localhost port 8123 code 6 db exception can not parse string 2023 09 19 15 00 00 000 as datetime syntax error at position 19 parse just 2023 09 19 15 00 00 while process select count from default t where ts todatetime 2023 09 19 15 00 00 000 can not parse text version 23 6 2 18 official build at ru yandex clickhouse except clickhouseexceptionspecifi getexception clickhouseexceptionspecifier java 91 at ru yandex clickhouse except clickhouseexceptionspecifier specify clickhouseexceptionspecifi java 55 at ru yandex clickhouse except clickhouseexceptionspecifier specify clickhouseexceptionspecifier java 28 at ru yandex clickhouse clickhousestatementimpl checkforerrorandthrow clickhousestatementimpl java 875 at ru yandex clickhouse clickhousestatementimpl getinputstream clickhousestatementimpl java 616 at ru yandex clickhouse clickhousestatementimpl executequery clickhousestatementimpl java 117 at ru yandex clickhouse clickhousestatementimpl executequery clickhousestatementimpl java 100 at ru yandex clickhouse clickhousestatementimpl executequery clickhousestatementimpl java 95 at ru yandex clickhouse clickhousestatementimpl executequery clickhousestatementimpl java 90 at ru yandex clickhouse clickhousepreparedstatementimpl executequery clickhousepreparedstatementimpl java 110 at com facebook presto plugin clickhouse clickhouserecordcursor clickhouserecordcursor java 92 17 more cause by java lang throwable code 6 db exception can not parse string 2023 09 19 15 00 00 000 as datetime syntax error at position 19 parse just 2023 09 19 15 00 00 while process select count from default t where ts todatetime 2023 09 19 15 00 00 000 can not parse text version 23 6 2 18 official build at ru yandex clickhouse except clickhouseexceptionspecifier specify clickhouseexceptionspecifi java 53 26 more possible solution I believe that this happen because of the incorrect handling of timestampwithtimezonetype timestamp constant in clickhousepushdownutil java l130 l135 gettimestampliteralasstre produce literal like timestamp 2023 09 25 00 00 00 000 l139 l143 clickhouse transform timestamp 2023 09 25 00 00 00 000 to todatetime 2023 09 25 00 00 00 000 which trigger a parse error switch from type casting timestamp to parsedatetimebesteffort function work for I so far java private static string gettimestampliteralasstre connectorsession session long millisutc sqltimestamp sqltimestamp new sqltimestamp millisutc millisecond return parsedatetimebesteffort sqltimestamp tostre
prestodbpresto
unsupportedoperationexception node planner plan metadatadeletenode do not have a graphviz visitor
Bug
see lot of these error in the log 2023 09 24t00 28 51 601 0700 warn dispatcher query 1063 com facebook presto event querymonitor error create graphviz plan for query 20230923 162951 05511 acq7 m java lang unsupportedoperationexception node com facebook presto sql planner plan metadatadeletenode do not have a graphviz visitor java lang unsupportedoperationexception node com facebook presto sql planner plan metadatadeletenode do not have a graphviz visitor at com facebook presto util graphvizprinter nodeprinter visitplan graphvizprinter java 268 at com facebook presto util graphvizprinter nodeprinter visitplan graphvizprinter java 246 at com facebook presto sql planner plan internalplanvisitor visitmetadatadelete internalplanvisitor java 102 at com facebook presto sql planner plan metadatadeletenode accept metadatadeletenode java 89 at com facebook presto sql planner plan internalplannode accept internalplannode java 36 at com facebook presto util graphvizprinter nodeprinter visitoutput graphvizprinter java 486 at com facebook presto util graphvizprinter nodeprinter visitoutput graphvizprinter java 246 at com facebook presto spi plan outputnode accept outputnode java 98 at com facebook presto util graphvizprinter printfragmentnode graphvizprinter java 240 at com facebook presto util graphvizprinter printdistributedfromfragment graphvizprinter java 203 at com facebook presto sql planner planprinter planprinter graphvizdistributedplan planprinter java 467 at com facebook presto event querymonitor creategraphvizqueryplan querymonitor java 472 at com facebook presto event querymonitor createquerymetadata querymonitor java 310 at com facebook presto event querymonitor querycompletedevent querymonitor java 250 cc kaikalur pranjalssh
prestodbpresto
bug in bitwise arithmetic shift right
Bug
I find a bug in presto bitwise arithmetic shift right function when shift negative big int to the right beyond 63 digit result 2 1 9223372036854775808 select bitwise arithmetic shift right cast 9223372036854775808 as bigint cast 62 as bigint bitwise arithmetic shift right cast 9223372036854775808 as bigint cast 63 as bigint bitwise arithmetic shift right cast 9223372036854775808 as bigint cast 64 as bigint this should give 1 it give 9223372036854775808 should be 2 1 1 I test it on int tiny int it work fine the problem be just with bigint input similarly bitwise arithmetic shift right cast 9223372036854775807 as bigint cast 64 as bigint this should give 0 not 9223372036854775807 result 2 1 9223372036854775808 select bitwise arithmetic shift right cast 9223372036854775808 as bigint cast 62 as bigint bitwise arithmetic shift right cast 9223372036854775808 as bigint cast 63 as bigint bitwise arithmetic shift right cast 9223372036854775808 as bigint cast 64 as bigint this should give 1 it give 9223372036854775808 result 2 1 1 select bitwise arithmetic shift right cast 128 as tinyint cast 6 as bigint bitwise arithmetic shift right cast 128 as tinyint cast 7 as bigint bitwise arithmetic shift right cast 128 as tinyint cast 8 as bigint result 2 1 1 select bitwise arithmetic shift right cast 2147483648 as int cast 30 as bigint bitwise arithmetic shift right cast 2147483648 as int cast 31 as bigint bitwise arithmetic shift right cast 2147483648 as int cast 32 as bigint select bitwise arithmetic shift right cast 1 as bigint cast 1 as bigint result 1 0 9223372036854775808 select bitwise arithmetic shift right cast 9223372036854775807 as bigint cast 62 as bigint bitwise arithmetic shift right cast 9223372036854775807 as bigint cast 63 as bigint bitwise arithmetic shift right cast 9223372036854775807 as bigint cast 64 as bigint this should give 0 it give 9223372036854775807 result 1 0 0 select bitwise arithmetic shift right cast 127 as tinyint cast 6 as bigint bitwise arithmetic shift right cast 127 as tinyint cast 7 as bigint bitwise arithmetic shift right cast 127 as tinyint cast 8 as bigint result 1 0 0 select bitwise arithmetic shift right cast 2147483647 as int cast 30 as bigint bitwise arithmetic shift right cast 2147483647 as int cast 31 as bigint bitwise arithmetic shift right cast 2147483647 as int cast 32 as bigint
prestodbpresto
json extract scalar return value extract from invalid json
Bug
I m see json extract scalar parse and return value from invalid json e g e g incomplete value json extract scalar k1 v1 k1 json extract scalar a b 1 garbage datum after the value json extract scalar k1 v1 abc k1 json extract scalar a b xyz 1 these all work fine in presto return non null result be this behavior expect and if so be it document under what circumstance this udf will succeed fail to parse invalid json see also for context
prestodbpresto
native max data size for stat sum data size for stat give incorrect result
Bug
aggregation function max data size for stat and sum data size for stat seem to be return incorrect value against velox for aggregation function sum datum size for stat expect behavior assertquery select sum data size for stat comment from order select sum length comment from order current behavior java lang assertionerror for query select sum data size for stat comment from order not equal actual row up to 100 of 1 extra row show 1 row in total 787364 expect row up to 100 of 1 missing row show 1 row in total 727364 for aggregation function max data size for stat expect behavior assertquery select max data size for stat comment from order select max length comment from order current behavior select max data size for stat comment from order not equal actual row up to 100 of 1 extra row show 1 row in total 82 expect row up to 100 of 1 missing row show 1 row in total 78
prestodbpresto
test other module failure table selector not find
Bug
your environment circle ci job failure log expect behavior current behavior order by priority desc parameter parsedparameter positional false parametername environment argument positional 0 test name environment test finder at org jdbi v3 core statement sqlstatement internalexecute sqlstatement java 1369 at org jdbi v3 core result resultproducer lambda getresultset 2 resultproducer java 68 at org jdbi v3 core result resultiterable lambda of 0 resultiterable java 53 at org jdbi v3 core result resultiterable stream resultiterable java 141 at org jdbi v3 core result resultiterable collect resultiterable java 197 at org jdbi v3 sqlobject statement internal resultreturner collectedresultreturner mappedresult resultreturner java 264 at org jdbi v3 sqlobject statement internal sqlqueryhandler lambda configurereturner 0 sqlqueryhandler java 54 at org jdbi v3 sqlobject statement internal customizingstatementhandler invoke customizingstatementhandler java 155 at org jdbi v3 sqlobject statement internal sqlqueryhandler invoke sqlqueryhandler java 26 at org jdbi v3 sqlobject sqlobjectfactory lambda null 13 sqlobjectfactory java 163 at org jdbi v3 core constanthandlesupplier invokeincontext constanthandlesupplier java 52 at org jdbi v3 sqlobject sqlobjectfactory lambda createinvocationhandler 14 sqlobjectfactory java 162 at com sun proxy proxy15 getselector unknown source at com facebook presto resourcegroup db dbmanagerspecprovider getmanagerspec dbmanagerspecprovider java 102 at com facebook presto resourcegroup reload reloadingresourcegroupconfigurationmanager load reloadingresourcegroupconfigurationmanager java 174 at com facebook presto resourcegroup reload testreloadingresourcegroupconfigurationmanager testrefreshinterval testreloadingresourcegroupconfigurationmanager java 207 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 invoker methodinvocationhelper invokemethod methodinvocationhelper java 135 at org testng internal invoker testinvoker invokemethod testinvoker java 673 at org testng internal invoker testinvoker invoketestmethod testinvoker java 220 at org testng internal invoker methodrunner runinsequence methodrunner java 50 at org testng internal invoker testinvoker methodinvocationagent invoke testinvoker java 945 at org testng internal invoker testinvoker invoketestmethod testinvoker java 193 at org testng internal invoker testmethodworker invoketestmethod testmethodworker java 146 at org testng internal invoker testmethodworker run testmethodworker java 128 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 750 cause by org h2 jdbc jdbcsqlsyntaxerrorexception table selector not find sql statement select s resource group i d s priority s user regex s source regex s query type s client tag s selector resource estimate s client info regex s schema s principal regex from selector s info info build failure info info total time 22 39 min info finish at 2023 09 15t16 56 50z info error fail to execute goal org apache maven plugins maven surefire plugin 3 0 0 m7 test default test on project presto parquet there be test failure possible solution step to reproduce 1 2 3 4 screenshot if appropriate context
prestodbpresto
presto 0 283 alluxio sdk cache error when parquet file change
Bug
when the data file format be parquet and the alluxio sdk cache be enable the follow error will be report when the data file be refresh alluxio ttl enable true parameter be also useless error expect magic number at tail 80 65 82 49 but find 110 111 13 10
prestodbpresto
consistent map construction for nest null
Bug
select map from entry array row array null 1 allow select map array array null array 1 user error should not allow nested null in map from entry I do not check multimap from entry
prestodbpresto
native aggregate function signature for null not support
Bug
the aggregate function approx distinct and min max min by max by set agg histogram fail when the input be null with the follow error cause by java lang runtimeexception aggregate function signature be not support presto default approx distinct unknown cause by veloxusererror aggregate function signature be not support presto default approx distinct unknown your environment presto version use master branch expect behavior the prestissimo result should match with that of presto result should be 0 for approx distinct or null for other aggregate current behavior veloxusererror step to reproduce run the follow query from testapproximatecountdistinct on a prestissimo cluster select approx distinct null cc aditi pandit
prestodbpresto
flaky test testcreateviewverification testrunninginquerybankmode
Bug
ci run step 7 26425
prestodbpresto
flaky test testpartialresultquerymanager testpartialresultquerymanager
Bug
ci run info result info error failure error testpartialresultquerymanager testpartialresultquerymanager 53 expect 2 but find 0 info error test run 7623 failure 1 error 0 skip 1 info info info build failure info info total time 29 52 min info finish at 2023 09 13t19 13 13z info error fail to execute goal org apache maven plugins maven surefire plugin 3 0 0 m7 test default test on project presto main there be test failure error error please refer to home runner work presto presto presto main target surefire report for the individual test result error please refer to dump file if any exist date dump date jvmrun n dump and date dumpstream error help 1
prestodbpresto
fail product test basic environment test
Bug
product test basic environment test have be fail off late due to disk space issue unhandled exception system io ioexception no space leave on device home runner runner 2 309 0 diag worker 20230913 140753 utc log example recent run I ve try to fix this in a recent commit but this hasn t help
prestodbpresto
native incorrect result for cast from varchar n to varchar m
Bug
there be a problem in cast between varchar type column with different length in prestissimo in the follow sql the input be a varchar 8 type column cast into varchar 3 and c worker return incorrect result this work correctly in presto presto tpch select cast varchar value as varchar 3 from value 9898 122 t varchar value col0 9898 122 note this be incorrect output the correct result should be 989 system information your environment presto version use master branch velox system info v0 0 2 commit fb5afdc532f3248b49302a4bdf0dbe406903882b cmake version 3 26 4 system darwin 22 4 0 arch x86 64 c compiler library developer commandlinetool usr bin c c compiler version 14 0 3 14030022 c compiler library developer commandlinetool usr bin cc c compiler version 14 0 3 14030022 cmake prefix path library developer commandlinetools sdks macosx13 1 sdk usr usr local usr usr local cellar cmake 3 26 4 usr local usr x11r6 usr pkg opt sw opt local expect behavior result of below query should be 989 current behavior result of below query be 9898 12 step to reproduce presto tpch select cast varchar value as varchar 3 from value 9898 122 t varchar value col0 9898 122 note this be incorrect output the correct result should be 989
prestodbpresto
unstable pipeline due to error commit write to hive
Bug
various test in the product test basic environment fail due to error commit write to hive 2023 09 11t19 04 17 6966308z 2023 09 12 00 49 17 info failure sql test testcase insert insert select star union all group insert take 2 6 second 2023 09 11t19 04 17 7053439z 2023 09 12 00 49 17 severe failure cause 2023 09 11t19 04 17 7057622z io prestodb tempto query queryexecutionexception java sql sqlexception query fail 20230911 190417 01242 y28b5 error commit write to hive 2023 09 11t19 04 17 7062796z at io prestodb tempto query jdbcqueryexecutor execute jdbcqueryexecutor java 115 2023 09 11t19 04 17 7063570z at io prestodb tempto query jdbcqueryexecutor executequery jdbcqueryexecutor java 83 2023 09 11t19 04 17 7069158z at io prestodb tempto internal convention sql sqlqueryconventionbasedtest runtestquery sqlqueryconventionbasedtest java 118 2023 09 11t19 04 17 7070407z at io prestodb tempto internal convention sql sqlqueryconventionbasedtest test sqlqueryconventionbasedtest java 101 2023 09 11t19 04 17 7075777z at io prestodb tempto internal convention conventionbasedtestproxygenerator conventionbasedtestproxy test conventionbasedtestproxygenerator java 124 2023 09 11t19 04 17 7076650z at io prestodb tempto insert insert select star union all unknown source 2023 09 11t19 04 17 7077152z at sun reflect nativemethodaccessorimpl invoke0 native method 2023 09 11t19 04 17 7081822z at sun reflect nativemethodaccessorimpl invoke nativemethodaccessorimpl java 62 2023 09 11t19 04 17 7082499z at sun reflect delegatingmethodaccessorimpl invoke delegatingmethodaccessorimpl java 43 2023 09 11t19 04 17 7088155z at java lang reflect method invoke method java 498 your environment presto version use late code base storage hdfs s3 gcs datum source and connector use n a deployment cloud or on prem n a pastebin link to the complete debug log full log from one run attach excerpt copy from log 2023 09 11t19 04 15 0864014z 2023 09 12 00 49 15 info 282 of 427 sql test testcase insert insert select star union all group insert 2023 09 11t19 04 17 6091799z presto worker 1 2023 09 12t00 49 17 607 0545 info 20230911 190417 01242 y28b5 1 0 0 0 33 37 org apache hadoop io compress codecpool get brand new compressor gz 2023 09 11t19 04 17 6546576z presto worker 1 2023 09 12t00 49 17 649 0545 warn thread 559 org apache hadoop hdfs dfsclient datastreamer exception 2023 09 11t19 04 17 6553962z presto worker 1 org apache hadoop ipc remoteexception java io ioexception file tmp presto hdfs 86c63d9f ad56 49b6 b9e8 75a2bf2f5e3f 20230911 190417 01242 y28b5 fbce23af 6b1a 4b59 a14d 15295a456eda gz could only be replicate to 0 node instead of minreplication 1 there be 1 datanode s run and no node s be exclude in this operation 2023 09 11t19 04 17 6558459z presto worker 1 at org apache hadoop hdfs server blockmanagement blockmanager choosetarget4newblock blockmanager java 1719 2023 09 11t19 04 17 6564493z presto worker 1 at org apache hadoop hdfs server namenode fsnamesystem getnewblocktarget fsnamesystem java 3372 2023 09 11t19 04 17 6565922z presto worker 1 at org apache hadoop hdfs server namenode fsnamesystem getadditionalblock fsnamesystem java 3296 2023 09 11t19 04 17 6570949z presto worker 1 at org apache hadoop hdfs server namenode namenoderpcserver addblock namenoderpcserver java 850 2023 09 11t19 04 17 6573051z presto worker 1 at org apache hadoop hdfs protocolpb clientnamenodeprotocolserversidetranslatorpb addblock clientnamenodeprotocolserversidetranslatorpb java 504 2023 09 11t19 04 17 6578961z presto worker 1 at org apache hadoop hdfs protocol proto clientnamenodeprotocolproto clientnamenodeprotocol 2 callblockingmethod clientnamenodeprotocolproto java 2023 09 11t19 04 17 6584598z presto worker 1 at org apache hadoop ipc protobufrpcengine server protobufrpcinvoker call protobufrpcengine java 640 2023 09 11t19 04 17 6585565z presto worker 1 at org apache hadoop ipc rpc server call rpc java 982 2023 09 11t19 04 17 6590151z presto worker 1 at org apache hadoop ipc server handler 1 run server java 2351 2023 09 11t19 04 17 6591212z presto worker 1 at org apache hadoop ipc server handler 1 run server java 2347 2023 09 11t19 04 17 6591956z presto worker 1 at java security accesscontroller doprivilege native method 2023 09 11t19 04 17 6597077z presto worker 1 at javax security auth subject doas subject java 422 2023 09 11t19 04 17 6597915z presto worker 1 at org apache hadoop security usergroupinformation doas usergroupinformation java 1869 2023 09 11t19 04 17 6603042z presto worker 1 at org apache hadoop ipc server handler run server java 2347 2023 09 11t19 04 17 6603835z presto worker 1 2023 09 11t19 04 17 6613607z presto worker 1 at org apache hadoop ipc client call client java 1476 2023 09 11t19 04 17 6674921z presto worker 1 at org apache hadoop ipc client call client java 1413 2023 09 11t19 04 17 6705287z presto worker 1 at org apache hadoop ipc protobufrpcengine invoker invoke protobufrpcengine java 229 2023 09 11t19 04 17 6706345z presto worker 1 at com sun proxy proxy319 addblock unknown source 2023 09 11t19 04 17 6712480z presto worker 1 at org apache hadoop hdfs protocolpb clientnamenodeprotocoltranslatorpb addblock clientnamenodeprotocoltranslatorpb java 418 2023 09 11t19 04 17 6713737z presto worker 1 at sun reflect generatedmethodaccessor425 invoke unknown source 2023 09 11t19 04 17 6718560z presto worker 1 at sun reflect delegatingmethodaccessorimpl invoke delegatingmethodaccessorimpl java 43 2023 09 11t19 04 17 6719659z presto worker 1 at java lang reflect method invoke method java 498 2023 09 11t19 04 17 6720442z presto worker 1 at org apache hadoop io retry retryinvocationhandler invokemethod retryinvocationhandler java 191 2023 09 11t19 04 17 6725565z presto worker 1 at org apache hadoop io retry retryinvocationhandler invoke retryinvocationhandler java 102 2023 09 11t19 04 17 6726333z presto worker 1 at com sun proxy proxy320 addblock unknown source 2023 09 11t19 04 17 6732049z presto worker 1 at org apache hadoop hdfs dfsoutputstream datastreamer locatefollowingblock dfsoutputstream java 1588 2023 09 11t19 04 17 6733027z presto worker 1 at org apache hadoop hdfs dfsoutputstream datastreamer nextblockoutputstream dfsoutputstream java 1373 2023 09 11t19 04 17 6739715z presto worker 1 at org apache hadoop hdfs dfsoutputstream datastreamer run dfsoutputstream java 554 2023 09 11t19 04 17 6740317z presto worker 1 2023 09 11t19 04 17 6743836z presto worker 1 2023 09 11t19 04 17 6745424z presto worker 1 2023 09 12t00 49 17 651 0545 error splitrunner 2 37 com facebook presto execution executor taskexecutor error processing split 20230911 190417 01242 y28b5 1 0 0 0 33 start 3273221 694011 wall 161 ms cpu 0 ms wait 0 ms call 2 hive writer close error error commit write to hive 2023 09 11t19 04 17 6752081z presto master 1 2023 09 12t00 49 17 660 0545 error remote task callback 47 com facebook presto execution stageexecutionstatemachine stage execution 20230911 190417 01242 y28b5 1 0 fail 2023 09 11t19 04 17 6753131z presto master 1 com facebook presto spi prestoexception error commit write to hive 2023 09 11t19 04 17 6759669z presto master 1 at com facebook presto hive recordfilewriter commit recordfilewriter java 186 2023 09 11t19 04 17 6765227z presto master 1 at com facebook presto hive hivewriter commit hivewriter java 102 2023 09 11t19 04 17 6765984z presto master 1 at com facebook presto hive hivepagesink dofinish hivepagesink java 237 2023 09 11t19 04 17 6771154z presto master 1 at com facebook presto hive authentication nohdfsauthentication doas nohdfsauthentication java 23 2023 09 11t19 04 17 6773147z presto master 1 at com facebook presto hive hdfsenvironment doas hdfsenvironment java 81 2023 09 11t19 04 17 6778371z presto master 1 at com facebook presto hive hivepagesink finish hivepagesink java 228 2023 09 11t19 04 17 6779457z presto master 1 at com facebook presto spi connector classloader classloadersafeconnectorpagesink finish classloadersafeconnectorpagesink java 74 2023 09 11t19 04 17 6785562z presto master 1 at com facebook presto operator tablewriteroperator finish tablewriteroperator java 292 2023 09 11t19 04 17 6786769z presto master 1 at com facebook presto operator driver processinternal driver java 451 2023 09 11t19 04 17 6792377z presto master 1 at com facebook presto operator driver lambda processfor 9 driver java 311 2023 09 11t19 04 17 6793509z presto master 1 at com facebook presto operator driver trywithlock driver java 732 2023 09 11t19 04 17 6797545z presto master 1 at com facebook presto operator driver processfor driver java 304 2023 09 11t19 04 17 6802203z presto master 1 at com facebook presto execution sqltaskexecution driversplitrunner processfor sqltaskexecution java 1079 2023 09 11t19 04 17 6803696z presto master 1 at com facebook presto execution executor prioritizedsplitrunner process prioritizedsplitrunner java 165 2023 09 11t19 04 17 6810333z presto master 1 at com facebook presto execution executor taskexecutor taskrunner run taskexecutor java 603 2023 09 11t19 04 17 6811230z presto master 1 at com facebook presto gen presto 0 284 snapshot 2d1757c 20230911 183121 1 run unknown source 2023 09 11t19 04 17 6816654z presto master 1 at java util concurrent threadpoolexecutor runworker threadpoolexecutor java 1149 2023 09 11t19 04 17 6817670z presto master 1 at java util concurrent threadpoolexecutor worker run threadpoolexecutor java 624 2023 09 11t19 04 17 6822258z presto master 1 at java lang thread run thread java 748 2023 09 11t19 04 17 6823829z presto master 1 cause by org apache hadoop ipc remoteexception file tmp presto hdfs 86c63d9f ad56 49b6 b9e8 75a2bf2f5e3f 20230911 190417 01242 y28b5 fbce23af 6b1a 4b59 a14d 15295a456eda gz could only be replicate to 0 node instead of minreplication 1 there be 1 datanode s run and no node s be exclude in this operation 2023 09 11t19 04 17 6829879z presto master 1 at org apache hadoop hdfs server blockmanagement blockmanager choosetarget4newblock blockmanager java 1719 2023 09 11t19 04 17 6830900z presto master 1 at org apache hadoop hdfs server namenode fsnamesystem getnewblocktarget fsnamesystem java 3372 2023 09 11t19 04 17 6835812z presto master 1 at org apache hadoop hdfs server namenode fsnamesystem getadditionalblock fsnamesystem java 3296 2023 09 11t19 04 17 6836856z presto master 1 at org apache hadoop hdfs server namenode namenoderpcserver addblock namenoderpcserver java 850 2023 09 11t19 04 17 6842976z presto master 1 at org apache hadoop hdfs protocolpb clientnamenodeprotocolserversidetranslatorpb addblock clientnamenodeprotocolserversidetranslatorpb java 504 2023 09 11t19 04 17 6844421z presto master 1 at org apache hadoop hdfs protocol proto clientnamenodeprotocolproto clientnamenodeprotocol 2 callblockingmethod clientnamenodeprotocolproto java 2023 09 11t19 04 17 6850273z presto master 1 at org apache hadoop ipc protobufrpcengine server protobufrpcinvoker call protobufrpcengine java 640 2023 09 11t19 04 17 6851089z presto master 1 at org apache hadoop ipc rpc server call rpc java 982 2023 09 11t19 04 17 6855915z presto master 1 at org apache hadoop ipc server handler 1 run server java 2351 2023 09 11t19 04 17 6856704z presto master 1 at org apache hadoop ipc server handler 1 run server java 2347 2023 09 11t19 04 17 6857343z presto master 1 at java security accesscontroller doprivilege native method 2023 09 11t19 04 17 6862373z presto master 1 at javax security auth subject doas subject java 422 2023 09 11t19 04 17 6863606z presto master 1 at org apache hadoop security usergroupinformation doas usergroupinformation java 1869 2023 09 11t19 04 17 6869369z presto master 1 at org apache hadoop ipc server handler run server java 2347 2023 09 11t19 04 17 6869888z presto master 1 2023 09 11t19 04 17 6875244z presto master 1 at org apache hadoop ipc client call client java 1476 2023 09 11t19 04 17 6875865z presto master 1 at org apache hadoop ipc client call client java 1413 2023 09 11t19 04 17 6881579z presto master 1 at org apache hadoop ipc protobufrpcengine invoker invoke protobufrpcengine java 229 2023 09 11t19 04 17 6882421z presto master 1 at com sun proxy proxy319 addblock unknown source 2023 09 11t19 04 17 6887371z presto master 1 at org apache hadoop hdfs protocolpb clientnamenodeprotocoltranslatorpb addblock clientnamenodeprotocoltranslatorpb java 418 2023 09 11t19 04 17 6888824z presto master 1 at sun reflect generatedmethodaccessor425 invoke unknown source 2023 09 11t19 04 17 6893634z presto master 1 at sun reflect delegatingmethodaccessorimpl invoke delegatingmethodaccessorimpl java 43 2023 09 11t19 04 17 6894507z presto master 1 at java lang reflect method invoke method java 498 2023 09 11t19 04 17 6895276z presto master 1 at org apache hadoop io retry retryinvocationhandler invokemethod retryinvocationhandler java 191 2023 09 11t19 04 17 6901616z presto master 1 at org apache hadoop io retry retryinvocationhandler invoke retryinvocationhandler java 102 2023 09 11t19 04 17 6902557z presto master 1 at com sun proxy proxy320 addblock unknown source 2023 09 11t19 04 17 6908042z presto master 1 at org apache hadoop hdfs dfsoutputstream datastreamer locatefollowingblock dfsoutputstream java 1588 2023 09 11t19 04 17 6909013z presto master 1 at org apache hadoop hdfs dfsoutputstream datastreamer nextblockoutputstream dfsoutputstream java 1373 2023 09 11t19 04 17 6914897z presto master 1 at org apache hadoop hdfs dfsoutputstream datastreamer run dfsoutputstream java 554 2023 09 11t19 04 17 6915492z presto master 1 2023 09 11t19 04 17 6919736z presto master 1 2023 09 11t19 04 17 6966308z 2023 09 12 00 49 17 info failure sql test testcase insert insert select star union all group insert take 2 6 second 2023 09 11t19 04 17 7053439z 2023 09 12 00 49 17 severe failure cause 2023 09 11t19 04 17 7057622z io prestodb tempto query queryexecutionexception java sql sqlexception query fail 20230911 190417 01242 y28b5 error commit write to hive 2023 09 11t19 04 17 7062796z at io prestodb tempto query jdbcqueryexecutor execute jdbcqueryexecutor java 115 2023 09 11t19 04 17 7063570z at io prestodb tempto query jdbcqueryexecutor executequery jdbcqueryexecutor java 83 2023 09 11t19 04 17 7069158z at io prestodb tempto internal convention sql sqlqueryconventionbasedtest runtestquery sqlqueryconventionbasedtest java 118 2023 09 11t19 04 17 7070407z at io prestodb tempto internal convention sql sqlqueryconventionbasedtest test sqlqueryconventionbasedtest java 101 2023 09 11t19 04 17 7075777z at io prestodb tempto internal convention conventionbasedtestproxygenerator conventionbasedtestproxy test conventionbasedtestproxygenerator java 124 2023 09 11t19 04 17 7076650z at io prestodb tempto insert insert select star union all unknown source 2023 09 11t19 04 17 7077152z at sun reflect nativemethodaccessorimpl invoke0 native method 2023 09 11t19 04 17 7081822z at sun reflect nativemethodaccessorimpl invoke nativemethodaccessorimpl java 62 2023 09 11t19 04 17 7082499z at sun reflect delegatingmethodaccessorimpl invoke delegatingmethodaccessorimpl java 43 2023 09 11t19 04 17 7088155z at java lang reflect method invoke method java 498 2023 09 11t19 04 17 7088995z at org testng internal invoker methodinvocationhelper invokemethod methodinvocationhelper java 135 2023 09 11t19 04 17 7095045z at org testng internal invoker testinvoker invokemethod testinvoker java 673 2023 09 11t19 04 17 7095848z at org testng internal invoker testinvoker invoketestmethod testinvoker java 220 2023 09 11t19 04 17 7100594z at org testng internal invoker methodrunner runinsequence methodrunner java 50 2023 09 11t19 04 17 7101509z at org testng internal invoker testinvoker methodinvocationagent invoke testinvoker java 945 2023 09 11t19 04 17 7105750z at org testng internal invoker testinvoker invoketestmethod testinvoker java 193 2023 09 11t19 04 17 7106535z at org testng internal invoker testmethodworker invoketestmethod testmethodworker java 146 2023 09 11t19 04 17 7111174z at org testng internal invoker testmethodworker run testmethodworker java 128 2023 09 11t19 04 17 7112036z at java util concurrent threadpoolexecutor runworker threadpoolexecutor java 1149 2023 09 11t19 04 17 7112648z at java util concurrent threadpoolexecutor worker run threadpoolexecutor java 624 2023 09 11t19 04 17 7120399z at java lang thread run thread java 748 2023 09 11t19 04 17 7126390z cause by java sql sqlexception query fail 20230911 190417 01242 y28b5 error commit write to hive 2023 09 11t19 04 17 7130709z at com facebook presto jdbc prestoresultset resultsexception prestoresultset java 1841 2023 09 11t19 04 17 7138516z at com facebook presto jdbc prestoresultset resultspageiterator computenext prestoresultset java 1821 2023 09 11t19 04 17 7143234z at com facebook presto jdbc prestoresultset resultspageiterator computenext prestoresultset java 1760 2023 09 11t19 04 17 7144167z at com facebook presto jdbc internal guava collect abstractiterator trytocomputenext abstractiterator java 141 2023 09 11t19 04 17 7149994z at com facebook presto jdbc internal guava collect abstractiterator hasnext abstractiterator java 136 2023 09 11t19 04 17 7150906z at com facebook presto jdbc internal guava collect transformediterator hasnext transformediterator java 42 2023 09 11t19 04 17 7156311z at com facebook presto jdbc internal guava collect iterators concatenatediterator gettopmetaiterator iterator java 1311 2023 09 11t19 04 17 7157232z at com facebook presto jdbc internal guava collect iterators concatenatediterator hasnext iterator java 1327 2023 09 11t19 04 17 7161864z at com facebook presto jdbc prestoresultset next prestoresultset java 146 2023 09 11t19 04 17 7162619z at com facebook presto jdbc prestostatement internalexecute prestostatement java 291 2023 09 11t19 04 17 7167433z at com facebook presto jdbc prestostatement execute prestostatement java 230 2023 09 11t19 04 17 7168222z at io prestodb tempto query jdbcqueryexecutor executequerynoparams jdbcqueryexecutor java 123 2023 09 11t19 04 17 7168946z at io prestodb tempto query jdbcqueryexecutor execute jdbcqueryexecutor java 108 2023 09 11t19 04 17 7173556z 20 more 2023 09 11t19 04 17 7174532z cause by com facebook presto spi prestoexception error commit write to hive 2023 09 11t19 04 17 7179565z at com facebook presto hive recordfilewriter commit recordfilewriter java 186 2023 09 11t19 04 17 7180202z at com facebook presto hive hivewriter commit hivewriter java 102 2023 09 11t19 04 17 7184854z at com facebook presto hive hivepagesink dofinish hivepagesink java 237 2023 09 11t19 04 17 7185586z at com facebook presto hive authentication nohdfsauthentication doas nohdfsauthentication java 23 2023 09 11t19 04 17 7190510z at com facebook presto hive hdfsenvironment doas hdfsenvironment java 81 2023 09 11t19 04 17 7191180z at com facebook presto hive hivepagesink finish hivepagesink java 228 2023 09 11t19 04 17 7195869z at com facebook presto spi connector classloader classloadersafeconnectorpagesink finish classloadersafeconnectorpagesink java 74 2023 09 11t19 04 17 7196819z at com facebook presto operator tablewriteroperator finish tablewriteroperator java 292 2023 09 11t19 04 17 7197883z at com facebook presto operator driver processinternal driver java 451 2023 09 11t19 04 17 7202870z at com facebook presto operator driver lambda processfor 9 driver java 311 2023 09 11t19 04 17 7203603z at com facebook presto operator driver trywithlock driver java 732 2023 09 11t19 04 17 7208907z at com facebook presto operator driver processfor driver java 304 2023 09 11t19 04 17 7209757z at com facebook presto execution sqltaskexecution driversplitrunner processfor sqltaskexecution java 1079 2023 09 11t19 04 17 7214828z at com facebook presto execution executor prioritizedsplitrunner process prioritizedsplitrunner java 165 2023 09 11t19 04 17 7215939z at com facebook presto execution executor taskexecutor taskrunner run taskexecutor java 603 2023 09 11t19 04 17 7220991z at com facebook presto gen presto 0 284 snapshot 2d1757c 20230911 183121 1 run unknown source 2023 09 11t19 04 17 7221632z 3 more 2023 09 11t19 04 17 7227917z cause by org apache hadoop ipc remoteexception file tmp presto hdfs 86c63d9f ad56 49b6 b9e8 75a2bf2f5e3f 20230911 190417 01242 y28b5 fbce23af 6b1a 4b59 a14d 15295a456eda gz could only be replicate to 0 node instead of minreplication 1 there be 1 datanode s run and no node s be exclude in this operation 2023 09 11t19 04 17 7229070z at org apache hadoop hdfs server blockmanagement blockmanager choosetarget4newblock blockmanager java 1719 2023 09 11t19 04 17 7234084z at org apache hadoop hdfs server namenode fsnamesystem getnewblocktarget fsnamesystem java 3372 2023 09 11t19 04 17 7234939z at org apache hadoop hdfs server namenode fsnamesystem getadditionalblock fsnamesystem java 3296 2023 09 11t19 04 17 7239840z at org apache hadoop hdfs server namenode namenoderpcserver addblock namenoderpcserver java 850 2023 09 11t19 04 17 7240909z at org apache hadoop hdfs protocolpb clientnamenodeprotocolserversidetranslatorpb addblock clientnamenodeprotocolserversidetranslatorpb java 504 2023 09 11t19 04 17 7242004z at org apache hadoop hdfs protocol proto clientnamenodeprotocolproto clientnamenodeprotocol 2 callblockingmethod clientnamenodeprotocolproto java 2023 09 11t19 04 17 7247859z at org apache hadoop ipc protobufrpcengine server protobufrpcinvoker call protobufrpcengine java 640 2023 09 11t19 04 17 7248617z at org apache hadoop ipc rpc server call rpc java 982 2023 09 11t19 04 17 7253720z at org apache hadoop ipc server handler 1 run server java 2351 2023 09 11t19 04 17 7254404z at org apache hadoop ipc server handler 1 run server java 2347 2023 09 11t19 04 17 7258913z at java security accesscontroller doprivilege native method 2023 09 11t19 04 17 7259380z at javax security auth subject doas subject java 422 2023 09 11t19 04 17 7264631z at org apache hadoop security usergroupinformation doas usergroupinformation java 1869 2023 09 11t19 04 17 7265297z at org apache hadoop ipc server handler run server java 2347 2023 09 11t19 04 17 7265579z 2023 09 11t19 04 17 7269562z at org apache hadoop ipc client call client java 1476 2023 09 11t19 04 17 7270938z at org apache hadoop ipc client call client java 1413 2023 09 11t19 04 17 7275959z at org apache hadoop ipc protobufrpcengine invoker invoke protobufrpcengine java 229 2023 09 11t19 04 17 7276584z at com sun proxy proxy319 addblock unknown source 2023 09 11t19 04 17 7277261z at org apache hadoop hdfs protocolpb clientnamenodeprotocoltranslatorpb addblock clientnamenodeprotocoltranslatorpb java 418 2023 09 11t19 04 17 7283297z at sun reflect generatedmethodaccessor425 invoke unknown source 2023 09 11t19 04 17 7283926z at sun reflect delegatingmethodaccessorimpl invoke delegatingmethodaccessorimpl java 43 2023 09 11t19 04 17 7288524z at java lang reflect method invoke method java 498 2023 09 11t19 04 17 7290338z at org apache hadoop io retry retryinvocationhandler invokemethod retryinvocationhandler java 191 2023 09 11t19 04 17 7305239z at org apache hadoop io retry retryinvocationhandler invoke retryinvocationhandler java 102 2023 09 11t19 04 17 7305837z at com sun proxy proxy320 addblock unknown source 2023 09 11t19 04 17 7311784z at org apache hadoop hdfs dfsoutputstream datastreamer locatefollowingblock dfsoutputstream java 1588 2023 09 11t19 04 17 7312632z at org apache hadoop hdfs dfsoutputstream datastreamer nextblockoutputstream dfsoutputstream java 1373 2023 09 11t19 04 17 7317421z at org apache hadoop hdfs dfsoutputstream datastreamer run dfsoutputstream java 554 2023 09 11t19 04 17 7317978z expect behavior test should pass current behavior test fail possible solution step to reproduce pipeline for prs be affect that do not change java code e g native change only screenshot if appropriate context
prestodbpresto
setdigest jaccard index implementation issue
Bug
for below query the jaccard index should be equal to 0 3333333333333333 but the output be come as 0 5 which be incorrect select jaccard index make set digest value make set digest value1 from value abc def ee abc t value value1 title incorrect jaccard index calculation description I ve encounter an issue with the jaccard index function in trino where the output do not match the expected result accord to the jaccard index formula here be the query I run select jaccard index make set digest value make set digest value1 from value abc def ee abc t value value1 the expect jaccard index for this query should be 0 3333333333333333 but the output be 0 5 select jaccard index make set digest value make set digest value1 from value 1 4 2 5 3 6 4 7 5 8 t value value1 for this query the set be s1 1 2 3 4 5 and s2 4 5 6 7 8 the expect jaccard index be 0 25 but the output be 0 4 the jaccard index be a measure of the similarity between two set and be calculate as the size of the intersection divide by the size of the union of the two set base on this the output of the above query should be 0 3333333333333333 and 0 25 respectively this seem to be a bug in the jaccard index function can someone look into this
prestodbpresto
native plan conversion fail with not a scalar type kind row array map
Bug
select from order where orderkey custkey in 1 2 3 4 veloxruntimeerror not a scalar type kind row at unknown 0 facebook velox veloxexception veloxexception char const unsigned long char const std basic string view std basic string view std basic string view std basic string view bool facebook velox veloxexception type std basic string view unknown source at unknown 1 void facebook velox detail veloxcheckfail std allocator const facebook velox detail veloxcheckfailargs const std cxx11 basic string std allocator const unknown source at unknown 2 facebook presto anonymous namespace convertinexpr std vector std allocator const facebook velox memory memorypool 0 operator const unknown source at unknown 3 facebook presto veloxexprconverter toveloxexpr std share ptr const unknown source at unknown 4 facebook presto veloxexprconverter toveloxexpr std share ptr const unknown source at unknown 5 facebook presto anonymous namespace toconnectortablehandle facebook presto protocol tablehandle const facebook presto veloxexprconverter const std unordered map std allocator std share ptr std hash std allocator std equal to std allocator std allocator std allocator const std share ptr unknown source at unknown 6 facebook presto veloxqueryplanconverterbase toveloxqueryplan std share ptr const std share ptr const std cxx11 basic string std allocator const unknown source at unknown 7 facebook presto veloxqueryplanconverterbase toveloxqueryplan std share ptr const std share ptr const std cxx11 basic string std allocator const unknown source at unknown 8 facebook presto veloxqueryplanconverterbase toveloxqueryplan facebook presto protocol planfragment const std share ptr const std cxx11 basic string std allocator const unknown source cc amitkdutta spershin zacw7
prestodbpresto
native map array null array x be fale with error scalar function presto default map not register with argument array array against velox
Bug
fail query select json format cast try map array null array x as json from value 1 2 t x error message veloxusererror scalar function presto default map not register with argument array array find function register with the follow signature array k array v map k v java lang assertionerror execution of actual query fail select json format cast try map array null array x as json from value 1 2 t x expect output should be equivalent to the output of this query select from value null null
prestodbpresto
native add support for presto default fail function
Bug
fail query select try cast a as bigint error message veloxusererror scalar function name not register presto default fail call with argument integer json java lang assertionerror execution of actual query fail select try cast a as bigint expect output null
prestodbpresto
native query with lambda function fail with scalar function name not register presto default apply against velox
Bug
fail query select apply 0 x x c1 from value 1 t c1 error message 2023 08 02t05 51 15 818 0600 error remote task callback 10 com facebook presto execution stageexecutionstatemachine stage execution 20230802 115115 00499 4ssae 0 0 fail veloxusererror scalar function name not register presto default apply call with argument integer function java lang assertionerror execution of actual query fail select apply 0 x x c1 from value 1 t c1 expect output value 1
prestodbpresto
when query a column of type map the key of the map be convert to lowercase
Bug
when run the follow query select map array myfirstrow mysecondrow array cast row row1fieldvalue1 row1fieldvalue2 as row firstfield varchar secondfield varchar cast row row2fieldvalue1 row2fieldvalue2 as row firstfield varchar secondfield varchar as mapfield I get the follow result mapfield mysecondrow firstfield row2fieldvalue1 secondfield row2fieldvalue2 myfirstrow firstfield row1fieldvalue1 secondfield row1fieldvalue2 1 row the key of the map be firstfield and secondfield in the query however they become firstfield and secondfield in the query result your environment presto version use 0 284 master branch storage hdfs s3 gcs n a datum source and connector use n a deployment cloud or on prem local dev env pastebin link to the complete debug log expect behavior the result should preserve the original key without lowercase they current behavior the key of a map be convert to lowercase possible solution not sure this be a cli or server side issue step to reproduce 1 start a presto cli 2 run the follow query select map array myfirstrow mysecondrow array cast row row1fieldvalue1 row1fieldvalue2 as row firstfield varchar secondfield varchar cast row row2fieldvalue1 row2fieldvalue2 as row firstfield varchar secondfield varchar as mapfield screenshot if appropriate context
prestodbpresto
set digest function hash count issue
Bug
select hash count make set digest value from value 1 1 1 2 2 t value query 20230825 135635 00045 6rvfh fail line 1 8 could not choose a good candidate operator explicit type cast must be add candidate be presto default hash count setdigest map bigint smallint presto default hash count setdigest varchar however in trino be work absolutely fine text x 23 return 20a 20map show function like hash count function return type argument type function type deterministic description variable arity build in temporary language hash count map bigint smallint setdigest scalar true false true false hash count varchar setdigest scalar true false true false 2 row
prestodbpresto
native unn fail for array of row
Bug
unn for array of row be not support in velox the follow error be see with query select from unnest array row 2 3 row 3 5 array row 20 30 row 30 50 as r r1 r2 r3 r4 field not find field 1 available field be field field 0
prestodbpresto
native tpcd prestissimo tpcd q18 q27 result mismatch
Bug
hi all I m investigate prestissimo tpcd q18 q27 l21 result mismatch issue and have narrow down the root cause to be different behavior in group by rollup between prestodb and prestissimo while all the datum be filter out in this special case prestissimo will return empty result while prestodb will return a row of null l557 l561 if some datum pass all the filter prestodb and prestissimo will produce the same result the reason why all datum be filter out in the tpcds test be because some auto generate datum be faulty for example column cd education status in table customer demographic be a varchar 20 with whatever char tail space it s be say instead of unknown the datum in that column will be something like unknown as a result no row can pass filter like this l26 and this l21 since no row pass all the filter I believe prestissimo s output empty instead of a row of null make more sense really appreciate if someone can look into this and make sure prestodb s result be expect commit I m use 1fda1368b1f16dc5e05f79640cc9ce837caf077d step to reproduce under presto mvnw clean install dskiptest t2c pl presto docs cd presto native engine git submodule update init recursive make debug run presto native execution src test java com facebook presto nativeworker testprestonativetpcdsqueriesparquetusingthrift java on intellij with follow vm option ea xmx8 g xx exitonoutofmemoryerror duser timezone america bahia bandera dhive security legacy dpresto server presto presto native execution build debug presto cpp main presto server ddata dir dworker count 1
prestodbpresto
flaky test testlargerowgroup testmemoryusedisnotafunctionofdatapagecount
Bug
this test have fail in some prs with no change to the presto parquet module ci run step 7 16337 error test run 86 failure 1 error 0 skip 0 time elapse 49 233 s failure in testsuite error com facebook presto parquet reader testlargerowgroup testmemoryusedisnotafunctionofdatapagecount time elapse 5 466 s failure java lang assertionerror 10000 page parquetreaderdeepsize actual 31511240 expect 21810380 expect true but find false at org testng assert fail assert java 110 at org testng assert failnotequal assert java 1413 at org testng assert asserttrue assert java 56 at com facebook presto parquet reader testlargerowgroup testmemoryusedisnotafunctionofdatapagecount testlargerowgroup java 132 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 invoker methodinvocationhelper invokemethod methodinvocationhelper java 135 at org testng internal invoker testinvoker invokemethod testinvoker java 673 at org testng internal invoker testinvoker invoketestmethod testinvoker java 220 at org testng internal invoker methodrunner runinsequence methodrunner java 50 at org testng internal invoker testinvoker methodinvocationagent invoke testinvoker java 945 at org testng internal invoker testinvoker invoketestmethod testinvoker java 193 at org testng internal invoker testmethodworker invoketestmethod testmethodworker java 146 at org testng internal invoker testmethodworker run testmethodworker java 128 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 750 info info result info error failure error testlargerowgroup testmemoryusedisnotafunctionofdatapagecount 132 10000 page parquetreaderdeepsize actual 31511240 expect 21810380 expect true but find false info error test run 86 failure 1 error 0 skip 0
prestodbpresto
bug presto jdbc select date timestamp give incorrect result for old date
Bug
use the presto jdbc jar and write java code to get date timestamp from string literal I get incorrect result java string url jdbc presto localhost 8080 connection conn drivermanager getconnection url test null preparedstatement statement conn preparestatement select date 1869 01 01 as x timestamp 1250 01 01 12 45 59 y resultset rs statement executequery while rs next system out println date r getdate 1 timestamp rs gettimestamp 2 r close this give I the output with date off by 1 or 2 day date 1868 12 31 timestamp 1249 12 25 12 22 31 0 I m run the presto server and this java program in my laptop which be set to ist timezone your environment presto version use 0 282 storage hdfs s3 gcs datum source and connector use deployment cloud or on prem on prem jvm adoptopenjdk 1 8 expect behavior output should be the same date that be give in the select statement current behavior output give date that be off by 1 or 2 day possible solution possible reason could be that joda library use in the presto jdbc jar have different tzdata than the one use in jvm step to reproduce 1 write a java program with code give above and use presto jdbc jar 2 run the java program context use date or timestamp type in string literal give a wrong result
prestodbpresto
native query with groupby clause fail again velox engine if run with prefilter for groupby limit session property set to true
Bug
session property set session prefilter for groupby limit true fail query select count custkey orderkey from order where orderstatus f and orderkey 50 group by orderkey limit 100 error message veloxusererror scalar function name not register presto default operator hash code call with argument bigint same query succeed if run after disable the session prefilter for groupby limit parameter here be the explain output for the query when it fail output col0 orderkey count bigint orderkey bigint estimate source costbasedsourceinfo row 100 1 76 kb cpu memory network col0 count 1 16 limit 100 orderkey bigint count bigint estimate source costbasedsourceinfo row 100 1 76 kb cpu memory network localexchange single orderkey bigint count bigint estimate source costbasedsourceinfo row 100 1 76 kb cpu memory network remotestreamingexchange gather orderkey bigint count bigint estimate source costbasedsourceinfo row 100 1 76 kb cpu memory network limitpartial 100 orderkey bigint count bigint estimate source costbasedsourceinfo row 100 1 76 kb cpu memory network aggregate final orderkey orderkey bigint count bigint count presto default count count 13 1 16 localexchange hash orderkey orderkey bigint count 13 bigint remotestreamingexchange repartition orderkey bigint count 13 bigint aggregate partial orderkey orderkey bigint count 13 bigint count 13 presto default count custkey 1 16 filterproject filterpredicate if cardinality expr 10 bigint 100 element at expr 10 combine crossjoin orderkey bigint custkey bigint combine hash 12 bigint expr 10 map bigint boolean distribution replicate scanproject table tablehandle connectorid hive connectorhandle hivetablehandle schemanam estimate source costbasedsourceinfo row 4 73b cpu 73 50 memory 0 00 network combine hash 12 combine hash bigint 0 coalesce operator hash code orderkey bigint layout tpch order domain orderstatus f orderkey 50 orderkey orderkey bigint 0 regular 1 46 50 custkey custkey bigint 1 regular 1 46 orderstatus varchar 1 2 regular f localexchange single expr 10 map bigint boolean remotestreamingexchange replicate expr 10 map bigint boolean aggregate final expr 10 map bigint boolean expr 10 presto default map agg map agg 1 102 localexchange single map agg map bigint boolean aggregate partial map agg map bigint boolean map agg presto default map agg combine hash expr 9 1 102 project projectlocality local combine hash bigint expr 9 boolean combine hash combine hash bigint 0 coalesce operator hash code expr 9 boolean true localexchange round robin orderkey bigint distinctlimit 100 orderkey bigint localexchange single orderkey bigint remotestreamingexchange gather orderkey bigint distinctlimitpartial 100 orderkey bigint tablescan tablehandle connectorid hive connecto estimate source costbasedsourceinfo row layout tpch order domain orderstatus orderkey orderkey bigint 0 regular 1 46 50 orderstatus varchar 1 2 regular f 1 row
prestodbpresto
native approx percentile do not support column as percentage
Bug
presto function approx percentile support use a column as percentage by take the last value in the column as the percentage value velox do not have this support so the follow error be see when run the query select approx percentile 0 1e0 x avg x min x from value 1 1 1 t x from presto test on prestissimo veloxusererror decode isconstantmappe percentile argument must be constant for all input row
prestodbpresto
testicebergdistributednessie be flaky
Bug
2023 08 01t15 46 23 3783487z error failure 2023 08 01t15 46 23 3802305z error testicebergdistributednessie init 45 containerlaunch container startup fail 2023 08 01t15 46 23 3803395z info 2023 08 01t15 46 23 3803751z error test run 1639 failure 1 error 0 skip 509 cc tdcmeehan yingsu00 majetideepak
prestodbpresto
plan contain unnecessary cross join
Bug
consider the schema t1 a1 int b1 int unn1 int cardinality 1000000 t2 a2 int b2 int unn2 int cardinality 1000000 t3 a3 int b3 int unn3 int cardinality 10 where unn column be unique for the query explain select 1 from t1 t2 t3 where a1 a2 a3 the join order be t2 cross t1 cross t3 however only 1 cross join be require I e t2 cross t3
prestodbpresto
bug optimize performance of discoverynodemanager refreshnodesinternal for large cluster
Bug
expect behavior current behavior when refresh nodes list discoverynodemanager first fetch all service and filter out bad node in failure detector the function getfaile will be call for each service but in the function getfaile failure detector will travel through all the task to check if the node be fail so this be a o n 2 complexity for filter out fail node this may seem ok when the cluster be small but performance will degrade as cluster get big in our production environment a big cluster have 900 node the performance of discoverynodemanager refreshnodesinternal will take about 6 ms possible solution here be the possible solution just save the fail node list first don t call getfaile for each service the time spend go down to 0 25ms after this optimization compare with 6ms before optimization
prestodbpresto
bug native exchange operator fail to deserialize serializedpage
Bug
circle ci linux presto version use release 0 284 storage hdfs s3 gcs local datum source and connector use tpch connector deployment cloud or on prem na pastebin link to the complete debug log expect behavior query shouldn t crash as a similar issue be fix here current behavior step to reproduce run this query on prestissimo cluster e2e select count from select from lineitem where orderkey 1024 0 lineitem leave join select from order where orderkey 1024 0 order on order orderkey 1024 context port test from presto java to native and this pr be block
prestodbpresto
native relocation r x86 64 pc32 against undefined hidden symbol error when make presto native execution
Bug
I encounter follow error when make presto native execution with last presto version usr bin ld usr local lib libthriftprotocol a compactprotocol cpp o relocation r x86 64 pc32 against undefined hidden symbol ztcn6apache6thrift8protocol18tprotocolexceptione0 ns0 17tlibraryexceptione can not be use when make a pie object usr bin ld bad value env system ubuntu 22 04 2 lts make version gnu make 4 3 gcc version gcc ubuntu 11 3 0 1ubuntu1 22 04 1 11 3 0 g version gcc ubuntu 11 3 0 1ubuntu1 22 04 1 11 3 0 log detail cmake build build release j 4 1 1 link cxx executable presto cpp main presto server fail presto cpp main presto server usr bin c mavx2 mfma mavx mf16c mlzcnt std c 17 mbmi2 werror wno nullability completeness wno deprecate declaration o3 dndebug velox velox connector hive cmakefiles velox hive connector dir filehandle cpp o velox velox connector hive cmakefiles velox hive connector dir hiveconfig cpp o velox velox connector hive cmakefiles velox hive connector dir hiveconnector cpp o velox velox connector hive cmakefiles velox hive connector dir hivedatasink cpp o velox velox connector hive cmakefiles velox hive connector dir hivedatasource cpp o velox velox connector hive cmakefiles velox hive connector dir hivepartitionutil cpp o velox velox connector hive cmakefiles velox hive connector dir partitionidgenerator cpp o velox velox connector hive cmakefiles velox hive connector dir tablehandle cpp o velox velox connector tpch cmakefiles velox tpch connector dir tpchconnector cpp o presto cpp main cmakefile presto server dir prestomain cpp o o presto cpp main presto server wl rpath usr local lib presto cpp main type cmakefiles presto type converter dir typesignaturetypeconverter cpp o presto cpp main type cmakefiles presto type converter dir antlr typesignaturelexer cpp o presto cpp main type cmakefiles presto type converter dir antlr typesignatureparser cpp o presto cpp main type cmakefile presto type dir prestotoveloxqueryplan cpp o presto cpp main type cmakefile presto type dir prestotoveloxexpr cpp o presto cpp main type cmakefile presto type dir prestotoveloxsplit cpp o presto cpp presto protocol cmakefiles presto protocol dir presto protocol cpp o presto cpp presto protocol cmakefiles presto protocol dir base64util cpp o presto cpp presto protocol cmakefiles presto protocol dir datasize cpp o presto cpp presto protocol cmakefiles presto protocol dir duration cpp o presto cpp presto protocol cmakefiles presto protocol dir connector cpp o presto cpp main libpresto server lib a velox velox function prestosql registration libvelox function prestosql a velox velox function prestosql aggregate libvelox aggregate a velox velox serializer libvelox presto serializer a presto cpp main connector hive storage adapter libpresto adapter a presto cpp main common libpresto exception a presto cpp main http libpresto http a presto cpp main http filter libhttp filter a usr local lib libproxygenhttpserver a usr local lib libproxygen a usr local lib libwangle a usr local lib libfizz a usr local lib libfmt a presto cpp main operator libpresto operator a presto cpp main common libpresto common a velox velox row libvelox row fast a velox velox function prestosql window libvelox window a velox velox function lib window libvelox function window a usr local lib libantlr4 runtime so lpthread velox velox dwio parquet libvelox dwio parquet reader a velox velox dwio parquet duckdb reader libvelox dwio duckdb parquet reader a velox velox duckdb memory libvelox duckdb allocator a velox velox duckdb conversion libvelox duckdb conversion a velox velox external duckdb tpch libtpch extension a velox velox dwio parquet reader libvelox dwio native parquet reader a velox velox dwio parquet thrift libvelox dwio parquet thrift a velox velox dwio parquet libvelox dwio parquet writer a velox velox dwio parquet writer libvelox dwio arrow parquet writer a velox third party arrow ep install lib libparquet a velox third party arrow ep install lib libarrow a usr local lib libthrift a presto cpp main thrift libpresto thrift cpp2 a usr local lib libthriftcpp2 a usr local lib libthriftprotocol a usr local lib libthriftmetadata a usr local lib libthrift core a usr local lib libtransport a presto cpp main thrift libpresto thrift extra a velox velox function prestosql libvelox function prestosql impl a velox velox function prestosql json libvelox function json a velox velox external md5 libmd5 a velox velox function prestosql type libvelox presto type a velox velox function lib libvelox be null function a dep simdjson build libsimdjson a velox velox function lib libvelox function lib a velox velox common hyperloglog libvelox common hyperloglog a velox velox function lib aggregate libvelox function aggregate a velox velox serializer libvelox presto serializer a velox velox exec libvelox exec a velox velox codegen libvelox codegen a velox velox exec libvelox exec a velox velox codegen libvelox codegen a velox velox vector arrow libvelox arrow bridge a velox velox connector hive libvelox hive partition function a velox velox dwio dwrf reader libvelox dwio dwrf reader a velox velox dwio dwrf writer libvelox dwio dwrf writer a velox velox dwio dwrf common libvelox dwio dwrf common a velox velox dwio common libvelox dwio common a velox velox dwio common exception libvelox dwio common exception a velox velox expression libvelox expression a velox velox core libvelox core a velox velox function lib libvelox function util a velox velox expression libvelox expression function a velox velox expression type calculation libvelox type calculation a velox velox dwio common encryption libvelox dwio common encryption a velox velox common cache libvelox cache a velox velox dwio common compression libvelox dwio common compression a usr lib x86 64 linux gnu libsnappy so velox velox dwio dwrf util libvelox dwio dwrf util a velox velox dwio dwrf proto libvelox dwio dwrf proto a usr lib x86 64 linux gnu libprotobuf so usr lib x86 64 linux gnu liblz4 so usr lib x86 64 linux gnu liblzo2 so usr lib x86 64 linux gnu libzstd so usr lib x86 64 linux gnu libz so velox velox common file libvelox file a velox velox connector libvelox connector a velox velox core libvelox config a velox velox tpch gen libvelox tpch gen a velox velox vector libvelox vector a velox velox common time libvelox time a velox velox type libvelox type a velox velox type tz libvelox type tz a velox velox common serialization libvelox serialization a velox velox external date libvelox external date a usr lib x86 64 linux gnu libre2 so usr lib x86 64 linux gnu libre2 so velox velox common encode libvelox encode a velox velox buffer libvelox buffer a velox velox common memory libvelox memory a velox velox common testutil libvelox test util a velox velox common base libvelox common base a velox velox common base libvelox exception a velox velox common process libvelox process a usr local lib libfolly a usr lib x86 64 linux gnu libdouble conversion so usr lib x86 64 linux gnu libboost context so 1 74 0 usr lib x86 64 linux gnu libevent so usr lib x86 64 linux gnu libz so usr lib x86 64 linux gnu libglog so usr lib x86 64 linux gnu libgflag so 2 2 2 usr lib x86 64 linux gnu libssl so usr lib x86 64 linux gnu libcrypto so usr lib x86 64 linux gnu libbz2 so usr lib x86 64 linux gnu libboost regex so 1 74 0 usr local lib libfmt a usr lib x86 64 linux gnu libboost filesystem so 1 74 0 usr lib x86 64 linux gnu libboost program option so 1 74 0 usr lib x86 64 linux gnu libboost system so 1 74 0 usr lib x86 64 linux gnu libboost thread so 1 74 0 usr lib x86 64 linux gnu libboost atomic so 1 74 0 usr lib x86 64 linux gnu liblzma so usr lib x86 64 linux gnu libsnappy so usr lib x86 64 linux gnu liblz4 so usr lib x86 64 linux gnu libzstd so usr lib x86 64 linux gnu libsodium so ldl usr lib x86 64 linux gnu libunwind so cd presto presto native execution script setup ubuntu sh make this give I error usr lib x86 64 linux gnu libglog so usr lib x86 64 linux gnu libgflag so 2 2 2 lpthread lib libgt a velox velox external duckdb tpch dbgen libdbgen a velox velox external duckdb libduckdb a usr bin ld usr local lib libthriftprotocol a compactprotocol cpp o relocation r x86 64 pc32 against undefined hidden symbol ztcn6apache6thrift8protocol18tprotocolexceptione0 ns0 17tlibraryexceptione can not be use when make a pie object usr bin ld bad value collect2 error ld return 1 exit status ninja build stop subcommand fail make 1 makefile 68 build errorcode 1 make 1 leave directory presto presto native execution make makefile 75 release errorcode 2
prestodbpresto
native decimal not get wrap in java type
Bug
for native workload decimal value be not get wrap in a java type follow test fail with the exception test testprestosparkexpressioncompiler smokedtest testprestosparkexpressioncompiler testsimplecase testprestosparkexpressioncompiler testunaryoperator testprestosparkexpressioncompiler testbinaryoperatorsdecimalbigint testprestosparkexpressioncompiler testbinaryoperatorsdecimalinteger testprestosparkexpressioncompiler testbinaryoperatorsdecimaldouble cause by java lang illegalargumentexception object 9 0 do not match type long at com facebook presto common util nativevaluetoblock util java 33 at com facebook presto operator scalar functionassertion interpret functionassertion java 947 at com facebook presto operator scalar functionassertion executeprojectionwithall functionassertion java 637 at com facebook presto operator scalar functionassertion selectuniquevalue functionassertion java 335 at com facebook presto operator scalar functionassertion selectsinglevalue functionassertion java 330 at com facebook presto operator scalar functionassertion assertfunction functionassertion java 258 at com facebook presto sql gen testexpressioncompiler assertexecutetask run testexpressioncompiler java 1950 31 more
prestodbpresto
native decimal issue in recursive structure
Bug
kp ibm have be assign to work on decimal issue on june 22 if decimal be include in the recursive structure for example row c0 decimal 20 1 c1 boolean when call variant tojson recursively the correct decimal type information be not pass in in addition the follow code in variant h do not pass in the type when call tojson and there will be problem in the decimal type krishna prasad p v
prestodbpresto
error report when upgrade to version 0 282
Bug
after upgrade to version 0 282 there be no problem with the master node but the two slave node keep report error 2023 06 20t11 25 49 919 0800 warn 20230620 032517 00264 q3yrz 1 0 1 0 175 44 alluxio client block stream grpcdatareader closing grpc read stream take long than 5000ms move on blockid 5949217570816 address workernetaddress host alluxio04 containerhost rpcport 29999 dataport 29999 webport 30000 domainsocketpath tieredidentity tieredidentity node alluxio04 rack null 2023 06 20t11 25 49 919 0800 warn 20230620 032517 00264 q3yrz 1 0 1 0 179 46 alluxio client file alluxiofileinstream fail to read block 5949418897408 of file warehouse iceberg db ods weapon ddo statistics data 02e807dc f06e 4820 ab73 1f0b306a10d3 parquet from worker workernetaddress host alluxio06 containerhost rpcport 29999 dataport 29999 webport 30000 domainsocketpath tieredidentity tieredidentity node alluxio06 rack null this worker will be skip for future read operation will retry alluxio exception status cancelledexception interrupt while wait for response zero copy grpcdatareader 2023 06 20t11 25 49 919 0800 warn 20230620 032517 00264 q3yrz 1 0 1 0 175 44 alluxio client file alluxiofileinstream fail to read block 5949217570816 of file warehouse iceberg db ods weapon ddo statistic datum 8ff7a359 347e 4f23 8194 69d0a98ba496 parquet from worker workernetaddress host alluxio04 containerhost rpcport 29999 dataport 29999 webport 30000 domainsocketpath tieredidentity tieredidentity node alluxio04 rack null this worker will be skip for future read operation will retry alluxio exception status cancelledexception interrupt while wait for response zero copy grpcdatareader 2023 06 20t11 25 49 919 0800 warn 20230620 032517 00264 q3yrz 1 0 1 0 178 47 alluxio client file alluxiofileinstream fail to read block 5949385342976 of file warehouse iceberg db ods weapon ddo statistic data c26546a8 c75f 45f5 a034 fe6dc6a61f83 parquet from worker workernetaddress host alluxio05 containerhost rpcport 29999 dataport 29999 webport 30000 domainsocketpath tieredidentity tieredidentity node alluxio05 rack null this worker will be skip for future read operation will retry alluxio exception status cancelledexception interrupt while wait for response zero copy grpcdatareader 2023 06 20t11 25 49 920 0800 warn 20230620 032517 00264 q3yrz 1 0 1 0 182 45 alluxio client file alluxiofileinstream fail to read block 5949586669568 of file warehouse iceberg db ods weapon ddo statistic datum 9c44e8e8 cd03 4a73 9558 fd12a599a7b4 parquet from worker workernetaddress host alluxio05 containerhost rpcport 29999 dataport 29999 webport 30000 domainsocketpath tieredidentity tieredidentity node alluxio05 rack null this worker will be skip for future read operation will retry alluxio exception status cancelledexception interrupt while wait for response zero copy grpcdatareader 2023 06 20t11 25 49 920 0800 warn 20230620 032517 00264 q3yrz 1 0 1 0 176 41 alluxio client file alluxiofileinstream fail to read block 5949318234112 of file warehouse iceberg db ods weapon ddo statistic data c2734b0d f3e3 42b7 9ce8 f21a605848aa parquet from worker workernetaddress host alluxio06 containerhost rpcport 29999 dataport 29999 webport 30000 domainsocketpath tieredidentity tieredidentity node alluxio06 rack null this worker will be skip for future read operation will retry alluxio exception status cancelledexception interrupt while wait for response zero copy grpcdatareader 2023 06 20t11 25 49 921 0800 warn 20230620 032517 00264 q3yrz 1 0 1 0 180 40 alluxio client file alluxiofileinstream fail to read block 5949486006272 of file warehouse iceberg db ods weapon ddo statistic datum 99a4190b 5668 47bd 91db 4ef7c652eeca parquet from worker workernetaddress host alluxio01 containerhost rpcport 29999 dataport 29999 webport 30000 domainsocketpath tieredidentity tieredidentity node alluxio01 rack null this worker will be skip for future read operation will retry alluxio exception status cancelledexception interrupt while wait for response zero copy grpcdatareader 2023 06 20t11 25 49 921 0800 warn 20230620 032517 00264 q3yrz 1 0 1 0 177 43 alluxio client file alluxiofileinstream fail to read block 5949402120192 of file warehouse iceberg db ods weapon ddo statistic datum e99ac63c 6432 4d89 93e2 3ba7582dc84c parquet from worker workernetaddress host alluxio03 containerhost rpcport 29999 dataport 29999 webport 30000 domainsocketpath tieredidentity tieredidentity node alluxio03 rack null this worker will be skip for future read operation will retry alluxio exception status cancelledexception interrupt while wait for response zero copy grpcdatareader 2023 06 20t11 25 49 921 0800 warn 20230620 032517 00264 q3yrz 1 0 1 0 181 42 alluxio client file alluxiofileinstream fail to read block 5949502783488 of file warehouse iceberg db ods weapon ddo statistic data bc78f956 3278 42d9 8566 7b3b8a9cf387 parquet from worker workernetaddress host alluxio06 containerhost rpcport 29999 dataport 29999 webport 30000 domainsocketpath tieredidentity tieredidentity node alluxio06 rack null this worker will be skip for future read operation will retry alluxio exception status cancelledexception interrupt while wait for response zero copy grpcdatareader
prestodbpresto
prestissimo add parquet write support on s3
Enhancement
we need to be able to write parquet and also to the s3 filesystem some work be require on the velox side for these feature velox issue track they
prestodbpresto
ensure that all endpoint in taskresource support thrift serialization
Good First Issue
various endpoint in taskresource support thrift serialization have a consume and produce annotation that include application thrift binary application thrift compact application thrift fb compact we should ensure that all endpoint consistently support thrift
prestodbpresto
array agg distinct column on a single table without join fail to build a query plan
Bug
we re run presto version 0 280 and be use apache pinot as the datum source the follow query to fetch a list of distinct value across four different column fail to generate a query plan and raise an error of the form invalid node aggregation mask symbol expr distinct 29 not in source plan output appliedat hiredat lastinteraction rejectedat i d select array agg distinct tbl1 1 appliedat array agg distinct tbl1 1 hiredat array agg distinct tbl1 1 lastinteraction array agg distinct tbl1 1 rejectedat from applicant tbl1 1 from the look of it presto s query planner try to push distinct down to pinot this doesn t play well with the array agg node because the aggregation be expect the aggregated node to be one of the column column1 or column2 but be instead get the intermediate value from the distinct operation I haven t be able to reproduce this issue while run array agg distinct on a joined query which be likely because join aren t push down to pinot and be execute within presto
prestodbpresto
native velox read the parquet format contain map type occur in coredump
Bug
hi all I use velox to read the parquet format contain the map type and then the worker occur core dump here be the sql example and gdb debug information sql eg select count from table where col abc xxxx gdb bt 0 facebook velox parquet mapcolumnreader mapcolumnreader this 0x7fa5ccc61e00 requestedtype param scanspec at root work prestodb presto native execution velox velox dwio parquet reader repeatedcolumnreader cpp 123 1 0x00000000034e6230 in std make unique lt facebook velox parquet mapcolumnreader std share ptr lt facebook velox dwio common typewithid const gt const amp facebook velox parquet parquetparam amp facebook velox common scanspec amp gt at opt rh devtoolset 9 root usr include c 9 bit unique ptr h 857 2 0x00000000034e0ffc in facebook velox parquet parquetcolumnreader build datatype param scanspec at root work prestodb presto native execution velox velox dwio parquet reader parquetcolumnreader cpp 71 3 0x0000000003a5056c in facebook velox parquet structcolumnreader structcolumnreader this 0x7fa5ccc61710 datatype param scanspec at root work prestodb presto native execution velox velox dwio parquet reader structcolumnreader cpp 34 4 0x00000000034e5dd3 in std make unique lt facebook velox parquet structcolumnreader std share ptr lt facebook velox dwio common typewithid const gt const amp facebook velox parquet parquetparam amp facebook velox common scanspec amp gt at opt rh devtoolset 9 root usr include c 9 bit unique ptr h 857 5 0x00000000034e0f24 in facebook velox parquet parquetcolumnreader build datatype param scanspec at root work prestodb presto native execution velox velox dwio parquet reader parquetcolumnreader cpp 61 6 0x00000000034cbbe9 in facebook velox parquet parquetrowreader parquetrowreader this 0x7fa5ccdec480 readerbase option at root work prestodb presto native execution velox velox dwio parquet reader parquetreader cpp 515 7 0x00000000034d05d3 in std make unique lt facebook velox parquet parquetrowreader std share ptr lt facebook velox parquet readerbase gt const amp facebook velox dwio common rowreaderoption const amp gt at opt rh devtoolset 9 root usr include c 9 bit unique ptr h 857 8 0x00000000034cc687 in facebook velox parquet parquetreader createrowreader this 0x7fa5ccc572b0 option at root work prestodb presto native execution velox velox dwio parquet reader parquetreader cpp 626 9 0x00000000005e3623 in facebook velox connector hive hivedatasource createrowreader this 0x7fa5cc002e90 option at root work prestodb presto native execution velox velox connector hive hiveconnector h 186 10 0x00000000005d88f6 in facebook velox connector hive hivedatasource addsplit this 0x7fa5cc002e90 split at root work prestodb presto native execution velox velox connector hive hiveconnector cpp 590 11 0x000000000414914f in facebook velox exec tablescan getoutput this 0x7fa5c0060bb0 at root work prestodb presto native execution velox velox exec tablescan cpp 141 12 0x0000000003faf56f in facebook velox exec driver runinternal this 0x7fa5c0062ed0 self blockingstate result at root work prestodb presto native execution velox velox exec driver cpp 375 13 0x0000000003fb019a in facebook velox exec driver run self at root work prestodb presto native execution velox velox exec driver cpp 490 gdb p scanspec child thread 0x7fa57c7d1700 lwp 37486 exit 1 const std vector lt std share ptr lt facebook velox common scanspec gt std allocator lt std share ptr lt facebook velox common scanspec gt gt gt amp 0x7fa5cc005958 lt std vector base lt std share ptr lt facebook velox common scanspec gt std allocator lt std share ptr lt facebook velox common scanspec gt gt gt gt m impl lt std allocator lt std share ptr lt facebook velox common scanspec gt gt gt lt gnu cxx new allocator lt std share ptr lt facebook velox common scanspec gt gt gt lt no datum field gt lt no datum field gt lt std vector base lt std share ptr lt facebook velox common scanspec gt std allocator lt std share ptr lt facebook velox common scanspec gt gt gt vector impl datum gt m start 0x0 m finish 0x0 m end of storage 0x0 lt no datum field gt lt no datum field gt slack message
prestodbpresto
native test flakiness destinationbuffer getdata receive after its buffer be delete
Bug
sometimes some of the native e2e test fail with error com facebook presto nativeworker testprestonativegeneralqueriesthrift testunionall time elapse 2 557 s failure java lang assertionerror execution of actual query fail with t as select null as a null as b union all select xxx as a 12 as b select from t t as u where t a u a and t b u b cause by veloxruntimeerror destinationbuffer getdata receive after its buffer be delete destination 1 sequence 0 cc tanjialiang spershin miaoever
prestodbpresto
explain format json for aggregate node
Bug
be this a bug the output name and identifier of explain format json for aggregate node be different from other node 1 name project 2 identifi projectlocality local 3 detail 4 child 5 i d 4 6 name aggregate final returnflag linestatus hashvalue 7 identifier see the difference between line 1 and 2 to line 6 and 7 should line 6 and 7 be 6 name aggregate final 7 identifi returnflag linestatus hashvalue repro step use tpch connector schema sf1 run query explain format json select returnflag linestatus sum quantity as sum qty sum extendedprice as sum base price sum extendedprice 1 discount as sum disc price sum extendedprice 1 discount 1 tax as sum charge avg quantity as avg qty avg extendedprice as avg price avg discount as avg disc count as count order from lineitem where shipdate date 1998 12 01 interval 90 day group by returnflag linestatus order by returnflag linestatus cause in planprinter visitaggregation only name be pass to addnode noderepresentation nodeoutput addnode node format aggregate s s s type key formathash node gethashvariable
prestodbpresto
unsupported partitioning handle type tpch table order totalrow 1500000
Bug
I try to run tpch q3 but I fail with the message above presto sf1 select l orderkey sum l extendedprice 1 l discount as revenue o orderdate o shippriority from customer order lineitem where c mktsegment machinery and c custkey o custkey and l orderkey o orderkey and o orderdate date 1995 03 23 and l shipdate date 1995 03 23 group by l orderkey o orderdate o shippriority order by revenue desc o orderdate limit 10 query 20230412 084933 00270 ea8sh fail 1 node split 10 total 3 do 30 00 latency client side 197m server side 182ms 152k row 56 9 mb 838k rows s 312 mb s query 20230412 084933 00270 ea8sh fail unsupported partitioning handle type tpch table order totalrow 1500000
prestodbpresto
division of min integral value 1 should overflow
Bug
divide the min integer value over 1 in prestodb should overflow it return incorrect result 9223372036854775808 1 return 9223372036854775806 select cast 2147483647 as int 1 1 1 in velox we throw overflow error
prestodbpresto
select query fail multichannelgroupbyhash channelbuilder be empty
Bug
sql presto default select null from select count 1 from select year from bigdata admin hive audit where year 2023 group by year as aaa limit 10 tmp query 20230404 072044 00076 c2qf5 fail 1 node split 65 total 7 do 10 77 240ms 0 row 0b 0 rows s 0b s log java lang arrayindexoutofboundsexception index 0 out of bound for length 0 at com google common collect regularimmutablelist get regularimmutablelist java 60 at com facebook presto operator multichannelgroupbyhash addnewgroup multichannelgroupbyhash java 329 at com facebook presto operator multichannelgroupbyhash putifabsent multichannelgroupbyhash java 312 at com facebook presto operator multichannelgroupbyhash putifabsent multichannelgroupbyhash java 289 at com facebook presto operator multichannelgroupbyhash access 200 multichannelgroupbyhash java 54 at com facebook presto operator multichannelgroupbyhash getrunlengthencodedgroupidswork process multichannelgroupbyhash java 843 at com facebook presto operator distinctlimitoperator processunfinishedwork distinctlimitoperator java 215 at com facebook presto operator distinctlimitoperator addinput distinctlimitoperator java 172 at com facebook presto operator driver processinternal driver java 434 at com facebook presto operator driver lambda processfor 9 driver java 307 at com facebook presto operator driver trywithlock driver java 728 at com facebook presto operator driver processfor driver java 300 at com facebook presto execution sqltaskexecution driversplitrunner processfor sqltaskexecution java 1079 at com facebook presto execution executor prioritizedsplitrunner process prioritizedsplitrunner java 162 at com facebook presto execution executor taskexecutor taskrunner run taskexecutor java 599 at com facebook presto gen presto 0 272 010 c59f4bc 0 272 20230403 013059 1 run unknown source at java base java util concurrent threadpoolexecutor runworker threadpoolexecutor java 1128 at java base java util concurrent threadpoolexecutor worker run threadpoolexecutor java 628 at java base java lang thread run thread java 834 explain clipboard image 1680592953743
prestodbpresto
prepend jdbc to databasemetadata geturl result
Bug
current databasemetadata geturl implementation return without jdbc but it should be include it as other database do it new uri url substre jdbc length
prestodbpresto
select query not work with prestissimo hive connector
Bug
I be try to do a select on hive table and not work presto default show table table employee employee1 genre horlytemp 4 row query 20230330 102136 00011 df8rv finish 2 node split 3 total 3 do 100 00 323ms 4 row 99b 12 rows s 306b s presto default presto default select from horlytemp query 20230330 102143 00012 df8rv fail hive unknown error the error in prestissimo log be i0330 12 21 43 496165 32 taskmanager cpp 332 start task 20230330 102143 00012 df8rv 0 0 0 with 16 max driver i0330 12 21 43 496668 32 taskmanager cpp 251 processing pende result request for task 20230330 102143 00012 df8rv 0 0 0 buffer 0 sequence 0 i0330 12 21 43 497409 37 taskmanager cpp 400 delete task 20230330 102143 00012 df8rv 0 0 0 e0330 12 21 43 497437 37 exception h 68 line velox velox exec task cpp 1383 function terminate expression abort for external error source runtime errorcode invalid state i0330 12 21 43 497925 37 task cpp 1391 terminate task 20230330 102143 00012 df8rv 0 0 0 with state abort after run for 1 ms i0330 12 21 43 498358 64 task cpp 739 all driver 16 finish for task 20230330 102143 00012 df8rv 0 0 0 after run for 2 ms i0330 12 21 43 507874 33 taskmanager cpp 110 taskmanager abortresult 20230330 102143 00012 df8rv 0 0 0 i0330 12 22 03 736963 28 taskmanager cpp 577 cleanoldtask clean 6 old task s in 0ms my hive property be cache enable true connector name hive hadoop2 hive metastore timeout 128 hive pushdown filter enable true hive metastore uri thrift hive metastore 9083
prestodbpresto
accumulo return wrong result on varchar n filter
Bug
the follow test fail in testaccumulodistributedquerie teststringfilter assertquery select count from test varcharn filter where shipmode air value 8491 it return 1 instead of 8491
prestodbpresto
if we enable parquet dereference pushdown the query will fail in some scenario
Bug
I have a table with the follow structure create table hive default ad test i d integer action info row process time bigint request type varchar request count integer with format parquet the datum in the table be as follow if I hadn t enable parquet dereference pushdown the follow query would have work select action info process time from ad test when I enable parquet dereference pushdown the query report an error the coordinator report the follow exception 2023 03 16t16 49 47 442 0800 warn dispatcher query 15 com facebook presto server throwablemapper request fail for v1 statement queue 20230316 084946 00009 uuz9z 2 com fasterxml jackson databind jsonmappingexception position be not valid 0 through reference chain com facebook presto client queryresult datum at com fasterxml jackson databind jsonmappingexception wrapwithpath jsonmappingexception java 394 at com fasterxml jackson databind jsonmappingexception wrapwithpath jsonmappingexception java 353 at com fasterxml jackson databind s std stdserializer wrapandthrow stdserializer java 316 at com fasterxml jackson databind s std beanserializerbase serializefield beanserializerbase java 729 at com fasterxml jackson databind ser beanserializer serialize beanserializer java 166 at com fasterxml jackson databind ser defaultserializerprovider serialize defaultserializerprovider java 480 at com fasterxml jackson databind ser defaultserializerprovider serializevalue defaultserializerprovider java 319 at com fasterxml jackson databind objectwriter prefetch serialize objectwriter java 1433 at com fasterxml jackson databind objectwriter writevalue objectwriter java 921 at com facebook airlift jaxrs jsonmapper writeto jsonmapper java 177 at org glassfish jersey message internal writerinterceptorexecutor terminalwriterinterceptor invokewriteto writerinterceptorexecutor java 266 at org glassfish jersey message internal writerinterceptorexecutor terminalwriterinterceptor aroundwriteto writerinterceptorexecutor java 251 at org glassfish jersey message internal writerinterceptorexecutor proceed writerinterceptorexecutor java 163 at org glassfish jersey server internal jsonwithpaddinginterceptor aroundwriteto jsonwithpaddinginterceptor java 109 at org glassfish jersey message internal writerinterceptorexecutor proceed writerinterceptorexecutor java 163 at org glassfish jersey server internal mappableexceptionwrapperinterceptor aroundwriteto mappableexceptionwrapperinterceptor java 85 at org glassfish jersey message internal writerinterceptorexecutor proceed writerinterceptorexecutor java 163 at org glassfish jersey message internal messagebodyfactory writeto messagebodyfactory java 1135 at org glassfish jersey server serverruntime responder writeresponse serverruntime java 662 at org glassfish jersey server serverruntime responder processresponse serverruntime java 395 at org glassfish jersey server serverruntime responder process serverruntime java 385 at org glassfish jersey server serverruntime asyncresponder 3 run serverruntime java 884 at org glassfish jersey internal error 1 call error java 272 at org glassfish jersey internal error 1 call error java 268 at org glassfish jersey internal error process error java 316 at org glassfish jersey internal error process error java 298 at org glassfish jersey internal error process error java 268 at org glassfish jersey process internal requestscope runinscope requestscope java 289 at org glassfish jersey server serverruntime asyncresponder resume serverruntime java 916 at org glassfish jersey server serverruntime asyncresponder resume serverruntime java 872 at com facebook airlift http server asyncresponsehandl 1 onsuccess asyncresponsehandler java 102 at com google common util concurrent future callbacklistener run future java 1058 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 750 cause by java lang illegalargumentexception position be not valid 0 at com facebook presto common block runlengthencodedblock checkreadableposition runlengthencodedblock java 344 at com facebook presto common block runlengthencodedblock isnull runlengthencodedblock java 314 at com facebook presto common type biginttype getobjectvalue biginttype java 34 at com facebook presto server protocol rowiterable rowiterator computenext rowiterable java 77 at com facebook presto server protocol rowiterable rowiterator computenext rowiterable java 50 at com google common collect abstractiterator trytocomputenext abstractiterator java 141 at com google common collect abstractiterator hasnext abstractiterator java 136 at com google common collect iterator concatenatediterator hasnext iterator java 1323 at com google common collect iterator 1 hasnext iterator java 136 at com fasterxml jackson databind ser std iterableserializer serializecontent iterableserializer java 83 at com fasterxml jackson databind ser std iterableserializer serialize iterableserializer java 74 at com fasterxml jackson databind ser std iterableserializer serialize iterableserializer java 12 at com fasterxml jackson databind ser std stddelegatingserializer serialize stddelegatingserializer java 168 at com fasterxml jackson databind ser beanpropertywriter serializeasfield beanpropertywriter java 727 at com fasterxml jackson databind s std beanserializerbase serializefield beanserializerbase java 721 31 more I check the cause of the exception and find that it be cause when action info be null
prestodbpresto
worker machine fail to connect to the coordinator when set up a prestissimo cluster
Bug
I be build a prestissimo cluster refer to the guide of on aw ec2 machine with ubuntu 22 04 I successfully start the hivequeryrunnerexternal on the coordinator in the idea and see the server start and discovery url in its log after that I change the config property file of my worker to the follow discovery uri http coordinator ip 34283 port number in the discovery url presto version testversion http server http port 41582 coordinator false discovery server enable true problem description however when I start the presto server service on the worker machine by command line root presto presto native execution build release presto cpp main presto server logtostderr 1 v 1 etc dir root presto presto native execution etc the log on the worker machine say that w0312 03 03 17 726486 7341 announcer cpp 154 announcement fail asyncsocketexception connect fail type socket not open errno 111 connection refuse trouble shoot attempt I test the port accessibility by run python3 m http server 34283 on the coordinator and http coordinator ip 34283 on the worker it can output some result which mean the http link between the two machine can be establish moreover when I try to start a presto server service on the coordinator machine it work I can see an active worker on the ui of my presto cluster what be cause the above problem be there some logic ban external connection at the software level that I haven t notice thank
prestodbpresto
issue query table of hive running metastore on derby
Bug
presto 0 280 hive 3 1 3 use derby metastore query show table from hive default will get timeout and in the hive log hive service metastore hiveconf hive root logger debug console cause by error 42818 comparison between clob ucs basic and clob ucs basic be not support type must be comparable string type must also have match collation if collation do not match a possible solution be to cast operand to force they to the default collation e g select tablename from sys systable where cast tablename as varchar 128 t1 seem to be an issue for hive 2 3 also know in trino and fix there
prestodbpresto
hudi connector do not read file include in pende compaction
Bug
we find that in this line hudi connector will filter out file group that be include in pende compaction operation which make the datum invisible to the user l110 codope could you please take a look at this
prestodbpresto
materialize view incremental refresh
Enhancement
currently the user have to explicitly state the partition that need refresh like refresh materialize view myview where datestr 2022 03 07 and country usa the propose solution aim to introduce a new refresh policy base on increment which automatically detect newly add datum and refresh only the relevant partition this would particularly benefit table and view that frequently receive new datum
prestodbpresto
task and query retry in presto
Enhancement
previously there be an issue in presto relate to improve reliability through retrie which have since be close you can find more information about this issue here trino on the other hand already have retry logic in place for task and query as describe in this document additionally the blog post link here explain how trino have propose and implement this give trino s success be there a plan to implement this in presto and port over the change
prestodbpresto
jdbc query date timestamp return result error 1900 01 01
Bug
prestodbpresto
tpcd connector generate different number of row on store return and store sale for 10 tb sf
Bug
tpcds spec say these two table should have 2 879 970 104 and 28 799 983 563 row respectively but the tpcds connector be return different number of row select count from tpcds sf10000 store return select count from tpcds sf10000 store sale page 42 screen shoot 2023 03 02 at 8 28 33 pm
prestodbpresto
native prestissimo crash when run tpc h test with 4thread
Bug
hi I be run tpc h sf 10 test with single node prestissimo the dataset format be parquet and be store in alibaba object storage service prestissimo access datum by aws s3 I use jdbc client to execute tpc h query sql when use 1thead or 2 thread or 3threads concurrency to execute the tpc h query with jdbc it be ok but prestissimo crash when use 4threads concurrency I debug in gdb execute the conmmand gdb args opt presto conf presto server etc dir opt presto conf etc cpp worker log dir opt presto datum cpp worker log there be only log program terminate with signal sigkill kill the program no long exist image I don t know why the prestissimo crash 8vcore 32 gb memory os ubuntu22 presto version 0 279
prestodbpresto
presto0 279 be not sensitive to case name of mongodb collection
Enhancement
for example if I insert a collection of uppercase name in mongodb schema collection of presto be automatically map to a collection of lowercase name and schema be empty image image therefore an error occur when select the table in presto presto xztest select from u3 query 20230228 072528 00029 4xsam fail table have no column tablehandle connectorid mongodb connectorhandle xztest u3 layout optional empty com facebook presto spi prestoexception table have no column tablehandle connectorid mongodb connectorhandle xztest u3 layout optional empty at com facebook presto metadata metadatamanager gettablemetadata metadatamanager java 471 at com facebook presto sql analyzer statementanalyzer visitor lambda visittable 20 statementanalyzer java 1283 at com facebook presto common runtimestat profilenano runtimestat java 136 at com facebook presto sql analyzer statementanalyzer visitor visittable statementanalyzer java 1281 at com facebook presto sql analyzer statementanalyzer visitor visittable statementanalyzer java 334 at com facebook presto sql tree table accept table java 53 at com facebook presto sql tree astvisitor process astvisitor java 27 at com facebook presto sql analyzer statementanalyzer visitor process statementanalyzer java 348 at com facebook presto sql analyzer statementanalyzer visitor analyzefrom statementanalyzer java 2606 at com facebook presto sql analyzer statementanalyzer visitor visitqueryspecification statementanalyzer java 1611 at com facebook presto sql analyzer statementanalyzer visitor visitqueryspecification statementanalyzer java 334 at com facebook presto sql tree queryspecification accept queryspecification java 138 at com facebook presto sql tree astvisitor process astvisitor java 27 at com facebook presto sql analyzer statementanalyzer visitor process statementanalyzer java 348 at com facebook presto sql analyzer statementanalyzer visitor process statementanalyzer java 356 at com facebook presto sql analyzer statementanalyzer visitor visitquery statementanalyzer java 1100 at com facebook presto sql analyzer statementanalyzer visitor visitquery statementanalyzer java 334 at com facebook presto sql tree query accept query java 105 at com facebook presto sql tree astvisitor process astvisitor java 27 at com facebook presto sql analyzer statementanalyzer visitor process statementanalyzer java 348 at com facebook presto sql analyzer statementanalyzer analyze statementanalyzer java 326 at com facebook presto sql analyzer analyzer analyzesemantic analyzer java 93 at com facebook presto execution sqlqueryexecution sqlqueryexecution java 206 at com facebook presto execution sqlqueryexecution sqlqueryexecution java 103 at com facebook presto execution sqlqueryexecution sqlqueryexecutionfactory createqueryexecution sqlqueryexecution java 934 at com facebook presto dispatcher localdispatchqueryfactory lambda createdispatchquery 0 localdispatchqueryfactory java 168 at com google common util concurrent trustedlistenablefuturetask trustedfutureinterruptibletask runinterruptibly trustedlistenablefuturetask java 125 at com google common util concurrent interruptibletask run interruptibletask java 57 at com google common util concurrent trustedlistenablefuturetask run trustedlistenablefuturetask java 78 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 image
prestodbpresto
officially support file base hive metastore
Enhancement
we have an undocumented hive metastore file feature that allow we to use a local file as the hive metastore we currently use this for testing however this can be very useful for presto developer as it allow query local file and also avoid launch a metadata service the follow config in hive property allow use a local file as the metastore connector name hive hadoop2 hive metastore file hive metastore catalog dir file datum hive datum create a schema create schema hive warehouse the above query will create a folder as datum hive datum warehouse create a table with any hive connector support file format create table hive warehouse order csv order name varchar quantity varchar with format csv create table hive warehouse order parquet order name varchar quantity int with format parquet the above query will create folder as datum hive datum warehouse order csv datum hive datum warehouse order parquet user can now insert and query from these table the challenge to read exist datum file be that the metastore need to know the file schema we can automate this step for file format such as parquet that contain the schema for other file format such as csv the user must manually specify the schema as above or provide prestoschema and prestopermission file once the table be create with the require schema user can move exist datum file to the table folder example a csv file say order csv with content book 100 can be move to datum hive datum warehouse order csv and can be query via presto note that the hive metastore catalog dir location can be on non local file system as well such as s3 this be discuss and approve by the tsc on
prestodbpresto
presto can t parse s3 path yyyy mm dd into timestamp type when run analyze statement
Enhancement
presto can t parse s3 path yyyy mm dd into timestamp type when run analyze statement even though select statement run fine here s how to reproduce the issue create table glue ng public kewei timestamp partition orderkey bigint shipdate timestamp with format parquet partition by array shipdate insert into glue ng public kewei timestamp partition value 1 from unixtime 1 insert into glue ng public kewei timestamp partition value 1 from unixtime 2 it work analyze glue ng public kewei timestamp partition on s3 I see 2 directory shipdate 1970 01 01 1970 01 01 00 00 01 and shipdate 1970 01 01 1970 01 01 00 00 02 I then manually create s3 directory shipdate 1970 01 01 and move parquet file from the 2 above directory into the new directory then I delete the above 2 directory call glue system sync partition metadata ng public kewei timestamp partition drop call glue system sync partition metadata ng public kewei timestamp partition add show 2 row select from glue ng public kewei timestamp partition fail with all compute statistic must be use analyze glue ng public kewei timestamp partition as another example when the partition column there be only one single partition column in the table type be timestamp and the s3 datum directory be name as shipdate 1970 01 01 00 3a00 3a01 0 the analyze statement work file but we have lot of table whose partition column type be timestamp and s3 datum directory be name as shipdate 1970 01 01 00 3a00 3a01 without the 0 suffix and the analyze statement fail with the com google common base verifyexception all compute statistic must be use error here s how to reproduce it create table glue ng public kewei timestamp partitioned2 orderkey bigint shipdate timestamp with format parquet partition by array shipdate insert into glue ng public kewei timestamp partitioned2 value 1 from unixtime 1 it work analyze glue ng public kewei timestamp partitioned2 on s3 I see one directory shipdate 1970 01 01 00 3a00 3a01 0 I then manually create s3 directory shipdate 1970 01 01 00 3a00 3a01 and move parquet file from shipdate 1970 01 01 00 3a00 3a01 0 into the new directory then I delete the above old directory shipdate 1970 01 01 00 3a00 3a01 0 call glue system sync partition metadata ng public kewei timestamp partitioned2 drop call glue system sync partition metadata ng public kewei timestamp partitioned2 add show 1 row select from glue ng public kewei timestamp partitioned2 fail with all compute statistic must be use analyze glue ng public kewei timestamp partitioned2
prestodbpresto
decimal sum aggregate return overflow error instead of result
Bug
once the result overflow the result be always an overflow error until there be an underflow presto select sum c0 from value decimal 99999999999999999999999999999999999999 decimal 99999999999999999999999999999999999999 decimal 99999999999999999999999999999999999999 t c0 query 20230213 002729 00003 24nx5 fail decimal overflow presto select sum c0 from value decimal 99999999999999999999999999999999999999 decimal 99999999999999999999999999999999999999 decimal 99999999999999999999999999999999999999 decimal 99999999999999999999999999999999999999 t c0 col0 0 1 row the final evaluation must consider both the overflow count and the sum value see l187
prestodbpresto
pluggable secret management logic in presto
Enhancement
another requirement which be really important for we to use presto in production grade scenario especially under the light of all audit and compliance requirement currently when you have a connector all the cred be store in the usual way and its not protect we need a a way to load secret to presto a during startup b on failure if connector need especially if the secret be rotate etc c may be when we get event from secret management system example for secret management system may be a b this could be a new plugin type and probably when the catalogue be load correspond secret could also be load roughly interface could look like below for the new plugin package com facebook presto spi security import java util map public interface secretsmanag map fetchsecret but before go this route I would like to get help from community on see any exist way of solve this problem else I would request kindly to consider this requirement
prestodbpresto
query audit and governance support in presto
Enhancement
this be a request for consideration for a new plugin type that can deal with audit and governance as the title indicate this new type of plugin should be able to do 1 query audit 2 governance this plugin could for example rewrite the query base on policy 1 by default this could be in a none mode which be as be 2 there can be a default implementation which can transform the query base on a policy json this would enable anybody who want to add some basic rule in the engine 3 anybody could write their implementation to handle the governance in the way they want for example microsoftazuredatacatalogqaagplugin could be a qaag plugin that would call data catalogue apis and transform the query accordingly ibmwkcqaagplugin could be a qaag plugin that would call wkc apis and transform the query accordingly this plugin type could be integrate to presto just after the parser be execute and preparedquery be available
prestodbpresto
npe occur when presto query datum from empty partition in hudi table
Bug
env flink 1 15 1 hadoop 3 2 1 hive 3 1 3 hudi 0 11 1 amzn 0 presto 0 273 spark 3 3 0 zookeeper 3 5 10 desc I write datum to hudi by flink streaming but sometimes some empty partition be create in hudi table like this image I query datum from these empty partition in hive it work fine but when in presto get npe image reason image when partition be empty filegroup be empty this partition can not be put to map image image image
prestodbpresto
get error reading from alluxio 19998 at position xxxxxxx
Bug
presto version 0 268 presto jdbc version 0 268 presto coordinator 1 worker 4 datum source alluxio file format parquet tool use for query in presto dbeaver presto cli when I be try run the query with dbeaver it s give the follow error com facebook presto spi prestoexception error reading from alluxio 19998 at position xxxxxxx important note the data size for some of the parquet file be large this error be a random error when it s try to read all parquet file store under alluxio it s fail on some of the file randomly on a daily basis please help I with this as it s a critical error for I I try a lot of configuration and solution but I be still not able to figure out why it s fail if someone figure out to resolve this then please help with this one let I know if more information be need
prestodbpresto
spill reduce memory pressure during unspill and merge sort stage for large group
Enhancement
create an issue to track the unspill merge sort improvement discuss during the review of this pr 18400 this affect hashaggregationoperator topn operator windowoperator and orderbyoperator we find out that in particular case the unspilling of page and merge sort they produce more memory pressure than the case where we didn t spill at all we should consider fix the merge sort code for these scenario scenario let s consider that under high memory pressure revoke be trigger multiple time during input collecting phase of the operator let we also consider that it be possible that within this input there be a group that have disproportionately large record count this large group will be present in its intermediate representation form in many all of the spill page now during unspill output we will read this datum few group at a time by copy the merge sorted group row into a new intermediate page before pass it for final reduce computation this intermediate page creation be base on the condition that it be atleast as large as pagebuilderstatus default max page size in byte and also full contain all the group this be implement by the function mergehashsort keepsamehashvalueswithinsinglepage this mean that when we encounter the say large group in this process the intermediate page will have to contain all the row of this group in this single page in memory so effectively we have create more memory pressure than if we have not spill at all possible solution 1 instead of mergesort produce fully contain group it can produce page with non fully contain group along with metadata of wether the last group in the page be fully contain the downstream builder spillablehashagg spillablegroupedtopn spillablepagestopagesindexe can use this metadata to decide when to flush 3 remove the intermediate page builder and directly pass the output of merge sort to the consumer cc rschlussel
prestodbpresto
drop function if exist throw function not find error
Bug
I m see that drop function if exist query fail when function doesn t exist give if exist clause I expect there be no error cc kaikalur majetideepak aditi pandit presto di drop function if exist dev mbasmanova hop query 20230123 160356 64908 b646d fail function not find dev mbasmanova hop
prestodbpresto
presto use old version for multiple package issue integrate secret manager with presto code
Enhancement
presto use old version for multiple package issue integrate secret manager with presto code I be try to integrate ibm secret manager with presto code to do so I need to add some dependency with presto main package presto version 0 278 com ibm cloud secret manager sdk core while try to build the code I be able to see transitive dependancie on com squareup okhttp3 okhttp com squareup okhttp3 okhttp urlconnection commons codec commons codec share error snippet fail while enforce requireupperbounddep the error s be require upper bind dependency error for com squareup okhttp3 okhttp 3 9 0 path to dependency be com facebook presto presto main 0 278 1 snapshot com facebook presto presto client 0 278 1 snapshot com squareup okhttp3 okhttp 3 9 0 and com facebook presto presto main 0 278 1 snapshot com ibm cloud secret manager 1 0 57 com ibm cloud sdk core 9 17 4 com squareup okhttp3 okhttp 3 9 0 manage com squareup okhttp3 okhttp 4 10 0 and com facebook presto presto main 0 278 1 snapshot com facebook presto presto client 0 278 1 snapshot com squareup okhttp3 okhttp urlconnection 3 9 0 com squareup okhttp3 okhttp 3 9 0 manage com squareup okhttp3 okhttp 4 10 0 and com facebook presto presto main 0 278 1 snapshot com ibm cloud secret manager 1 0 57 com ibm cloud sdk core 9 17 4 com squareup okhttp3 log interceptor 4 10 0 com squareup okhttp3 okhttp 3 9 0 manage com squareup okhttp3 okhttp 4 10 0 1 be there any strategy step define in presto community to resolve transitive dependancy 2 will these package upgrade to new version in near future release
prestodbpresto
fix issue with column masking
Bug
we have identify an issue with presto code where column mask use aw lake formation be still visible when the table be query through presto this particular issue be find in a scenario in which we be connect to amazon s3 use glue as hive metastore and hive hadoop2 as connector and 1 or more column in a table have be restrict for a user use aw lake formation issue if we be query a table in which 1 or more column be mask use aw lakeformation the mask column name be get remove from the result but the mask datum be come under the wrong column and original column datum be miss as well for example we have a table person with 5 column personid lastname firstname address city original datum select from person personid lastname firstname address city 1 doe john abc tvm 2 smith rachel def ekm 3 hernandez manuel ghi tsr 4 emmanuel aria jkl clt 4 row use aw lake formation we be restrict mask the access to the column address for a particular user then if we be call the below query to fetch all column we be expect the result without address column and datum as below expect result select from person personid lastname firstname city 3 hernandez manuel tsr 2 smith rachel ekm 4 emmanuel aria clt 1 doe john tvm 4 row but in the actual result we be get the datum of the address column instead of city column actual result select from person personid lastname firstname city 1 doe john abc 3 hernandez manuel ghi 2 smith rachel def 4 emmanuel aria jkl 4 row
prestodbpresto
memory pool assignment logic not correct
Bug
I think the follow newestassignment resolving seem not correct to get new assignement from run query should we not use max version namely use max rather than min original code l536
prestodbpresto
iceberg table be not filter out correctly
Bug
description use presto jdbc driver version 0 277 there be a few issue with iceberg table filtering use gettable driver s method below code correctly find the iceberg table in the iceberg catalog java databasemetadata meta con getmetadata resultset re meta gettable iceberg icb null new string table the result icebergtest 1 when I enter the non exist table name java databasemetadata meta con getmetadata resultset re meta gettable iceberg preto null new string table I m get all the table that be on hive atable coffee db tabs10000x db tabs50000x default empty hivecczoo hiveconnector hivepartitionwrite icb impala information schema lng sampledb stock sys testdb userdb correct behavior no table should be return 2 when I enter the exist but non iceberg table java databasemetadata meta con getmetadata resultset re meta gettable iceberg atable null new string table I m get the error error java sql sqlexception query fail 20230113 152508 00142 f5fpv java net sockettimeoutexception read time out attach the full stacktrace fullstacktrace txt correct behavior no table should be return or a message that would say that table be not an iceberg table 3 when I enter the non exist table and when I don t specify the catalog name java databasemetadata meta con getmetadata resultset re meta gettable null preto null new string table I m get once again the whole list of table from the hive atable coffee db tabs10000x db tabs50000x default empty hivecczoo hiveconnector hivepartitionwrite icb impala information schema lng sampledb stock sys testdb userdb correct behavior no table should be return presto catalog configuration iceberg property property connector name iceberg hive metastore uri thrift hivehost hiveport iceberg catalog type hive hive property property connector name hive hadoop2 hive metastore uri thrift hivehost hiveport hive metastore username hive hive allow drop table true hive hdfs impersonation enable false
prestodbpresto
presto fail to connect hive query table from s3
Bug
presto user cdc 0301s select count from mysql cdc sync hive 0301s ro query 20230112 094313 00001 q532x fail java lang classnotfoundexception class org apache hadoop fs s3a s3afilesystem not find I can query this s3 table normally in hive full stack information query 20230113 124402 00001 c9r2p fail java lang classnotfoundexception class org apache hadoop fs s3a s3afilesystem not find java lang runtimeexception java lang classnotfoundexception class org apache hadoop fs s3a s3afilesystem not find at org apache hadoop conf configuration getclass configuration java 2197 at org apache hadoop fs filesystem getfilesystemclass filesystem java 2654 at org apache hadoop fs prestofilesystemcache createfilesystem prestofilesystemcache java 144 at org apache hadoop fs prestofilesystemcache getinternal prestofilesystemcache java 89 at org apache hadoop fs prestofilesystemcache get prestofilesystemcache java 62 at org apache hadoop fs filesystem get filesystem java 373 at org apache hadoop fs path getfilesystem path java 295 at org apache hudi common fs fsutil getfs fsutil java 107 at org apache hudi common table hoodietablemetaclient getfs hoodietablemetaclient java 294 at org apache hudi common table hoodietablemetaclient hoodietablemetaclient java 127 at org apache hudi common table hoodietablemetaclient newmetaclient hoodietablemetaclient java 641 at org apache hudi common table hoodietablemetaclient access 000 hoodietablemetaclient java 80 at org apache hudi common table hoodietablemetaclient builder build hoodietablemetaclient java 710 at com facebook presto hive hudidirectorylister hudidirectorylister java 61 at com facebook presto hive storagepartitionloader storagepartitionloader java 143 at com facebook presto hive delegatingpartitionloader delegatingpartitionloader java 54 at com facebook presto hive backgroundhivesplitloader backgroundhivesplitloader java 90 at com facebook presto hive hivesplitmanager getsplit hivesplitmanager java 293 at com facebook presto spi connector classloader classloadersafeconnectorsplitmanager getsplits classloadersafeconnectorsplitmanager java 41 at com facebook presto split splitmanager getsplit splitmanager java 89 at com facebook presto split closeablesplitsourceprovider getsplit closeablesplitsourceprovider java 52 at com facebook presto sql planner splitsourcefactory visitor lambda visittablescan 0 splitsourcefactory java 157 at com facebook presto sql planner lazysplitsource getdelegate lazysplitsource java 96 at com facebook presto sql planner lazysplitsource getconnectorid lazysplitsource java 48 at com facebook presto execution scheduler sectionexecutionfactory createstageschedul sectionexecutionfactory java 281 at com facebook presto execution scheduler sectionexecutionfactory createstreaminglinkedstageexecution sectionexecutionfactory java 243 at com facebook presto execution scheduler sectionexecutionfactory createstreaminglinkedstageexecution sectionexecutionfactory java 221 at com facebook presto execution scheduler sectionexecutionfactory createsectionexecution sectionexecutionfactory java 167 at com facebook presto execution scheduler legacysqlqueryscheduler createstageexecution legacysqlqueryscheduler java 353 at com facebook presto execution scheduler legacysqlqueryscheduler legacysqlqueryscheduler java 242 at com facebook presto execution scheduler legacysqlqueryscheduler createsqlqueryscheduler legacysqlqueryscheduler java 171 at com facebook presto execution sqlqueryexecution plandistribution sqlqueryexecution java 564 at com facebook presto execution sqlqueryexecution start sqlqueryexecution java 411 at com facebook presto gen presto 0 278 1 ec67ba1 20230113 124308 1 run unknown source at com facebook presto execution sqlquerymanager createquery sqlquerymanager java 286 at com facebook presto dispatcher localdispatchquery lambda startexecution 8 localdispatchquery java 197 at java util concurrent threadpoolexecutor runworker threadpoolexecutor java 1149 at java util concurrent threadpoolexecutor worker run threadpoolexecutor java 624 at java lang thread run thread java 748 cause by java lang classnotfoundexception class org apache hadoop fs s3a s3afilesystem not find at org apache hadoop conf configuration getclassbyname configuration java 2101 at org apache hadoop conf configuration getclass configuration java 2195 38 more
prestodbpresto
micro barrier shuffle architecture
Enhancement
this doc be write a while ago some content be out date and may be inaccurate afaik there be no plan to have a new architecture this be post mainly to provide thought on alternative architecture and perhaps some of the idea can still be use to improve the current system without the full architecture change
prestodbpresto
iceberg table creation from presto fail in aw glue
Bug
the table create statement from presto to aws glue metastore fail with below error presto create schema isl progress with location s3 xxxxxx create schema presto create table isl progress sprint detail sprint i d int sprint progress pct varchar query 20221114 115537 00033 tb3fw fail lock be not support by default I be use presto 0 277 to connect create insert iceberg table in aws glue I be able to run select query for iceberg table in glue but not able to do insert or table creation below be the stack trace query 20221116 103709 00002 qie8q fail lock be not support by default com facebook presto common notsupportedexception lock be not support by default at com facebook presto hive metastore extendedhivemetastore lock extendedhivemetastore java 126 at com facebook presto hive metastore cachinghivemetastore lock cachinghivemetastore java 997 at com facebook presto iceberg hivetableoperation commit hivetableoperation java 244 at org apache iceberg basetransaction lambda commitsimpletransaction 5 basetransaction java 386 at org apache iceberg util tasks builder runtaskwithretry task java 404 at org apache iceberg util task builder runsinglethreade task java 214 at org apache iceberg util task builder run task java 198 at org apache iceberg util task builder run task java 190 at org apache iceberg basetransaction commitsimpletransaction basetransaction java 378 at org apache iceberg basetransaction committransaction basetransaction java 268 at com facebook presto iceberg icebergabstractmetadata finishinsert icebergabstractmetadata java 250 at com facebook presto spi connector classloader classloadersafeconnectormetadata finishinsert classloadersafeconnectormetadata java 452 at com facebook presto metadata metadatamanager finishinsert metadatamanager java 896 at com facebook presto sql planner localexecutionplanner lambda createtablefinish 3 localexecutionplanner java 3221 at com facebook presto operator tablefinishoperator getoutput tablefinishoperator java 289 at com facebook presto operator driver processinternal driver java 426 at com facebook presto operator driver lambda processfor 9 driver java 309 at com facebook presto operator driver trywithlock driver java 730 at com facebook presto operator driver processfor driver java 302 at com facebook presto execution sqltaskexecution driversplitrunner processfor sqltaskexecution java 1079 at com facebook presto execution executor prioritizedsplitrunner process prioritizedsplitrunner java 166 at com facebook presto execution executor taskexecutor taskrunner run taskexecutor java 599 at com facebook presto gen presto 0 277 119fd9a 20221116 101723 1 run unknown source 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 750
prestodbpresto
the event listener query cause the task to fail
Bug
the event listener query cause the task to fail plugin event listener add the following below easywheel presto event 1 0 snapshot shaded jar guava 29 0 jre jar jackson annotation 2 13 4 jar jackson core 2 13 4 jar jackson databind 2 13 4 jar kafka client 2 2 1 jar log4j 1 2 17 jar etc event listener property add the following below event listener name event listener mapper default writer kafka date prefix format yyyy mm dd hh time zone gmt current base path opt presto data var log complete base path opt presto data var query complete query file suffix complete query log event name complete kafka complete topic lineage kafka complete bootstrap server datum hadoop001 test yigongpin com 9092 datum hadoop002 test yigongpin com 9092 datum hadoop001 test yigongpin com 9092 kafka complete ack all kafka complete retrie 2 kafka complete batch size 5 kafka complete key serializer org apache kafka common serialization stringdeserializer kafka complete value serializer org apache kafka common serialization stringserializer the above presto can start normally if you enter the client query the packet be as follow image but I have check and add or delete the dependent package and it be the same error
prestodbpresto
bug in lambda variable capture in lateral cause
Bug
all the alternative of the lateral clause should work however the first one fail as it can not capture the variable the 2nd version work mysteriously select from value array 1 2 map array 1 2 array a b as t arr mapping cross join lateral select transform arr v mapping v as result this do not work cross join lateral select mapping as xxxxxx transform arr v mapping v as result this work cross join unnest array transform arr v mapping v as t2 result this work cross join lateral select transform arr v v as result this work too
prestodbpresto
resource group tagging
Enhancement
resource group have multiple sometimes compete goal ensure fairness for user while also ensure maximum safe throughput for a cluster for mature production system it be important to introduce high level metric that show whether or not user expectation be be meet this may be throughput queue time or other metric however due to the tree structure of resource group it be difficult to pinpoint such metric to single resource group nodes often resource group be dynamically generate base on source or user which widen the structure and make overall measurement difficult resource group feature a very nice metric call adjust queue size which attempt to normalize queue size base on queue due to external factor such as high level group make resource unavailable for child group however this metric doesn t factor in relative importance one may have e g peak and off peak resource group and one may target aggressive resource for peak while leave off peak less it be not possible to tell use adjust queue size which of the metric be be more affected than the other we should implement a tag that cut across resource group and allow all child resource group with the same tag to be aggregate in one request one can then query for specific metric such as average queue time queue time at various quantile number of user and source etc by separate our metric for the various tag away from the other tag one can well understand if the resource group be adequately optimize to grant resource fairly across the performance metric here be an example of what a resource group tag with red and hipri tag might look like json name resource group hipri hard concurrency limit 40 soft concurrency limit 10 max queue 1500 soft memory limit 25 jmx export true tag red hipri a new endpoint may be create which query resource group information by tag which sum up queue time and collect per query metric such as average queue time across all tag
prestodbpresto
native add support for row struct in value clause
Good First Issue
pr 18274 add support for map and array in value clause this issue about add support for struct select from value 1 row 1 test as t a b query 20220906 130852 01826 h2hkx fail error fetch cc majetideepak aditi pandit
prestodbpresto
materialize view query optimization do not handle filter in where clause
Bug
materialize view optimization should occur if the materialize view represent a domain which be a superset of the base query however this do not occur in many case due to type mismatch failure these type mismatch exception be throw even when one would expect type coercion to allow for comparison e g comparison between integer and bigint the line of failure be when domaintranslator frompredicate be call l496 an example test failure
prestodbpresto
use thrift to serialize metadata object instead of json on catalog server
Enhancement
currently in the catalog server metadata object be serialize into a json string for now what we want to do be be able to use a thrift struct to do so
prestodbpresto
introduce segment aggregation flush threshold
Enhancement
17886 introduce segment aggregation the current implementation need to close the aggregation builder destroy the hash table then reopen the aggregation builder and recreate the hash table when flush the finished segment s however if the segment be very small this process have to be repeat too many time result in overhead cost therefore it might be helpful to introduce a flush threshold to prevent the aggregation build be rebuild too frequently
prestodbpresto
materialize view optimization do not occur with incompatible decimal type in filter condition
Bug
when a query be make with a filter over a set of value x and an exist materialize view exist with a filter over a set of value v such that x v the materialized view optimization may fail to occur this be previously be register as a false positive in this test l545 l549 this be due to a different parsingoption l33 than what would be use in real operation l92 the unit test be remove as part of in the future it may be worth support this properly step to reproduce 1 create a materialize view with a filter on a decimal field 2 create an base query with a filter on a decimal field where the filter be a subset of the materialize view s filter condition more restrictive the base query otherwise compatible for a materialize view optimization rewrite the decimal field in the base query be a different precision than that of the materialize view s filter condition expect outcome the query optimize correctly actual outcome query fail to optimize with error mismatch domain type
prestodbpresto
dynamic filter doesn t filter datum after enable this feature in some case
Enhancement
my env datum tpc ds 20 g on hive all hive table have statistic info presto have already run analyze table presto version 0 273 1 presto config experimental enable dynamic filtering true optimizer join reorder strategy automatic join distribution type automatic I run the tpc ds in my test env and find the dynamic filter can not reduce the amount of scanned datum of the fact table in some case tpcd 05 sql be with ssr as select s store i d sum sale price sale sum profit profit sum return amt return sum net loss profit loss from select ss store sk store sk ss sell date sk date sk ss ext sale price sale price ss net profit profit cast 0 as decimal 7 2 return amt cast 0 as decimal 7 2 net loss from store sale union all select sr store sk store sk sr return date sk date sk cast 0 as decimal 7 2 sale price cast 0 as decimal 7 2 profit sr return amt return amt sr net loss net loss from store return salesreturn date dim store where date sk d date sk and d date between cast 2000 08 23 as date and cast 2000 08 23 as date interval 14 day and store sk s store sk group by s store i d csr as select cp catalog page i d sum sale price sale sum profit profit sum return amt return sum net loss profit loss from select cs catalog page sk page sk cs sell date sk date sk cs ext sale price sale price cs net profit profit cast 0 as decimal 7 2 return amt cast 0 as decimal 7 2 net loss from catalog sale union all select cr catalog page sk page sk cr return date sk date sk cast 0 as decimal 7 2 sale price cast 0 as decimal 7 2 profit cr return amount return amt cr net loss net loss from catalog return salesreturn date dim catalog page where date sk d date sk and d date between cast 2000 08 23 as date and cast 2000 08 23 as date interval 14 day and page sk cp catalog page sk group by cp catalog page i d wsr as select web site i d sum sale price sale sum profit profit sum return amt return sum net loss profit loss from select ws web site sk wsr web site sk ws sell date sk date sk ws ext sale price sale price ws net profit profit cast 0 as decimal 7 2 return amt cast 0 as decimal 7 2 net loss from web sale union all select ws web site sk wsr web site sk wr return date sk date sk cast 0 as decimal 7 2 sale price cast 0 as decimal 7 2 profit wr return amt return amt wr net loss net loss from web return leave join web sale on wr item sk ws item sk and wr order number ws order number salesreturn date dim web site where date sk d date sk and d date between cast 2000 08 23 as date and cast 2000 08 23 as date interval 14 day and wsr web site sk web site sk group by web site i d select channel i d sum sale sale sum return return sum profit profit from select store channel channel concat store s store i d i d sale return profit profit loss profit from ssr union all select catalog channel channel concat catalog page cp catalog page i d i d sale return profit profit loss profit from csr union all select web channel channel concat web site web site i d i d sale return profit profit loss profit from wsr x group by rollup channel i d order by channel asc i d asc limit 100
prestodbpresto
add time runtimeunit
Enhancement
we need to add this a time unit for prestissimo query as there be several metric that depend on it such as createtime this will allow we to properly check for the time against its unit value refer to runtimeunit
prestodbpresto
simple count query on druid datasource use presto druid connector return null
Bug
hello I be do a simple count query on druid datasource use presto druid connector on aws emr presto 0 267 but it return null value when I select a few row I be able to the result please check the detail give below presto druid select from poc test2 time col1 col2 col3 col4 2022 01 01 00 00 00 000 2022 01 01 1001 test1 comment1 2022 01 15 00 00 00 000 2022 01 15 1002 test2 comment2 2022 01 01 00 00 00 000 2022 01 01 1005 test1 comment1 2022 01 15 00 00 00 000 2022 01 15 1006 test2 comment2 2022 02 11 00 00 00 000 2022 02 11 1003 test3 comment3 2022 02 19 00 00 00 000 2022 02 19 1004 test4 comment4 2022 02 19 00 00 00 000 2022 02 19 1004 test4 comment5 7 row query 20220513 082344 00014 2b5hg finish 2 node split 17 total 17 do 100 00 300ms 7 row 392b 23 rows s 1 28 kb s presto druid select count col2 from poc test1 col0 null 1 row query 20220513 082406 00015 2b5hg finish 1 node split 17 total 17 do 100 00 208m 1 row 9b 4 rows s 43b s presto druid select sum col2 from poc test1 col0 null 1 row query 20220513 082429 00016 2b5hg finish 1 node split 17 total 17 do 100 00 176ms 1 row 9b 5 rows s 51b s presto druid presto druid presto druid explain select count col2 from poc test1 output col0 count bigint col0 count 1 16 remotestreamingexchange gather count bigint tablescan tablehandle connectorid druid connectorhandle druidtablehandle schemaname druid tablename poc test1 dql optional generateddql dql select count col2 from poc test1 tab count druidcolumnhandle columnname count columntype bigint type derive 1 16 1 row query 20220513 082441 00017 2b5hg finish 1 node split 1 total 1 do 100 00 0 03 0 row 0b 0 rows s 0b s presto druid explain select sum col2 from poc test1 output col0 sum bigint col0 sum 1 16 remotestreamingexchange gather sum bigint tablescan tablehandle connectorid druid connectorhandle druidtablehandle schemaname druid tablename poc test1 dql optional generateddql dql select sum col2 from poc test1 table sum druidcolumnhandle columnname sum columntype bigint type derive 1 16 look like this be a bug in presto I try the same sql with trino and I get the correct output trino druid select count from poc test1 col0 3 1 row edit trino druid select count from poc test1 col0 3 1 row edit reference
prestodbpresto
pinot presto number format error on max function
Bug
if we have a timestamp field in pinot table and run select max timestamp column from my table pinot throw the below error java lang illegalargumentexception invalid timestamp 1 672528152e13 at org apache pinot spi util timestamputil tomillissinceepoch timestamputil java 63 at com facebook presto pinot pinotbrokerpagesourcebase parsetimestamp pinotbrokerpagesourcebase java 196 at com facebook presto pinot pinotbrokerpagesourcebase setvalue pinotbrokerpagesourcebase java 174 at com facebook presto pinot pinotbrokerpagesourcebase setvalue pinotbrokerpagesourcebase java 137 at com facebook presto pinot pinotbrokerpagesourcebase setrow pinotbrokerpagesourcebase java 267 at com facebook presto pinot pinotbrokerpagesourcesql populatefromqueryresult pinotbrokerpagesourcesql java 122 this be because in pinot right now max return double
prestodbpresto
java lang nullpointerexception when query from mysql
Bug
presto server 0 272 1 java version 1 8 0 191 mysql connector java 5 1 48 jar then I repacle the presto plugin mysql mysql connector java 5 1 48 jar to mysql connector java 8 0 27 jar still get this exception 2022 05 11t14 10 17 777 0800 error 20220511 061017 00005 bh6fr 1 0 0 0 130 com facebook presto operator driver error closing operator 0 for task 20220511 061017 00005 bh6fr 1 0 0 java lang nullpointerexception at com mysql jdbc mysqlio clearinputstream mysqlio java 892 at com mysql jdbc rowdatadynamic close rowdatadynamic java 171 at com mysql jdbc resultsetimpl realclose resultsetimpl java 6644 at com mysql jdbc resultsetimpl close resultsetimpl java 841 at com facebook presto plugin jdbc jdbcrecordcursor close jdbcrecordcursor java 219 at com facebook presto operator scanfilterandprojectoperator finish scanfilterandprojectoperator java 193 at com facebook presto operator scanfilterandprojectoperator close scanfilterandprojectoperator java 177 at com facebook presto operator driver closeanddestroyoperator driver java 605 at com facebook presto operator driver processinternal driver java 458 at com facebook presto operator driver lambda processfor 9 driver java 307 at com facebook presto operator driver trywithlock driver java 728 at com facebook presto operator driver processfor driver java 300 at com facebook presto execution sqltaskexecution driversplitrunner processfor sqltaskexecution java 1079 at com facebook presto execution executor prioritizedsplitrunner process prioritizedsplitrunner java 162 at com facebook presto execution executor taskexecutor taskrunner run taskexecutor java 599 at com facebook presto gen presto 0 272 1 eb8be21 20220511 054824 1 run unknown source 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
exception when use optimize repartitioning
Bug
one of our user query fail with java lang unsupportedoperationexception accumulateserializedrowsize be not support for fix width type at com facebook presto operator repartition longarrayblockencodingbuffer accumulateserializedrowsize longarrayblockencodingbuffer java 52 at com facebook presto operator repartition optimizedpartitionedoutputoperator partitionbuffer populateserializedrowsize optimizedpartitionedoutputoperator java 741 at com facebook presto operator repartition optimizedpartitionedoutputoperator partitionbuffer appenddata optimizedpartitionedoutputoperator java 688 at com facebook presto operator repartition optimizedpartitionedoutputoperator partitionbuffer access 200 optimizedpartitionedoutputoperator java 619 at com facebook presto operator repartition optimizedpartitionedoutputoperator pagepartitioner partitionpage optimizedpartitionedoutputoperator java 548 at com facebook presto operator repartition optimizedpartitionedoutputoperator addinput optimizedpartitionedoutputoperator java 177 at com facebook presto operator driver processinternal driver java 434 at com facebook presto operator driver lambda processfor 9 driver java 307 but work when we turn off optimize repartitioning
prestodbpresto
scan report wrong input position
Bug
currently scanfilterandproject operator report the same input position vs raw input position and input bytes vs raw input byte and we would always see same number for these counter from operator stat and query stat private void recordinputstat checkstate pagesource null pagesource be null long endcompletedbyte pagesource getcompletedbyte long endcompletedposition pagesource getcompletedposition long endreadtimenano pagesource getreadtimenano long inputbyte endcompletedbyte completedbyte long positioncount endcompletedposition completedposition operatorcontext recordprocessedinput inputbyte positioncount input operatorcontext recordrawinputwithtiming inputbyte positioncount endreadtimenano readtimenano raw input operatorcontext updatestat pagesource getruntimestat completedbyte endcompletedbyte completedposition endcompletedposition readtimenano endreadtimenano raw input by its original definition be what be pull from raw storage before decompression and decode and input be what be actually decode when some datum be skip e g rowgroup be eliminate or row skip these two shall be different and input position can be small than raw input position there be some explanation in the past in the first screenshot what s the difference between input datum and raw input datum raw input datum I know be the number of row or size in hive file dain comment on sep 27 2018 issuecomment 425174265 I m not sure on this one but iirc raw be the datum pull raw storage and the other one be after be have be decode in the input stage you get a big difference when you have compression or stat that allow you to skip data section shixuan fan comment on jun 21 2019 issuecomment 504496925 my understanding be that input datum be the size after decompression while physical input datum be the size before decompression moreover this post explain the difference between raw input and input before aria presto tpch select count shipdate from lineitem where shipdate between date 1992 01 01 and date 1992 12 31 col0 76036301 1 row query 20200609 154258 00019 ug2v4 finish 1 node split 367 total 367 do 100 00 0 09 600 m rows 928 mb 63 2 m rows s 97 7 mb s after aria presto tpch select count shipdate from lineitem where shipdate between date 1992 01 01 and date 1992 12 31 col0 76036301 1 row query 20200609 154413 00023 ug2v4 finish 1 node split 367 total 367 do 100 00 0 05 76 m rows 928 mb 15 5 m rows s 189 mb s with the filter push down presto read only 76 m row vs the previous 600 m row but now we don t see any difference with and without aria filter pushdown this behavior be introduce from
prestodbpresto
implement null salting for handle null skew in join
Enhancement
when a large table with a lot of null key skew be leave join with another table due to the null skew it can take a long time during the shuffle so we should have an optimization that use salt with some unmatchable random value as key to mitigate this issue cc rschlussel
prestodbpresto
inconsistent handling of null input in cardinality approx set vs approx distinct
Enhancement
intuitively one would expect cardinality approx set x to return same result as approx distinct x however we be see that be not always the case here be an example presto select approx distinct x cardinality approx set null count distinct x from value null as t x col0 col1 col2 0 null 0 1 row you send cc rongrong kaikalur tdcmeehan highker aweisberg spershin yuanzhanhku
prestodbpresto
migrate from esri to geotool for geometry package
Enhancement
currently presto geo function be base on the esri package the repository be dead and doesn t get any update the more common library be geotool which be actively maintain and commit to for example esri have an open pr for almost a year to support ewkb format geo from postgre the pr be complete and just pende merge this could have directly solve some of the issue while try to select multipolygon geometry type from table cause by com esri core geometry geometryexception invalid shape type at com esri core geometry operatorimportfromwkblocal importfromwkb operatorimportfromwkblocal java 366 at com esri core geometry operatorimportfromwkblocal executeogc operatorimportfromwkblocal java 183 at com esri core geometry ogc ogcgeometry frombinary ogcgeometry java 597 at com facebook presto plugin postgresql postgresqlclient getgeomfrombinary postgresqlclient java 223 at com facebook presto plugin postgresql postgresqlclient lambda geometrycolumnmapping 1 postgresqlclient java 210 at com facebook presto plugin jdbc jdbcrecordcursor getslice jdbcrecordcursor java 173 please let I know what you guy think
prestodbpresto
enum distinct from operator do not work with complex type
Bug
fail query assertsinglevalue array test enum mood happy be distinct from array test enum mood sad true to fix we should add an implementation with block position syntax
prestodbpresto
prestos3filesystem delete swallow error in recursive mode
Bug
the error handling of prestos3filesystem delete see prestos3filesystem 492 l492 seem to be break if call with the recursive flag enable it will try to delete directory content but doesn t check for error report through the return value as a consequence the delete call will return true even if the object with the give path be not delete the same issue be observe for triniodb issue 11352
prestodbpresto
timestampwithtimezone do not take into account timezone to calculate hash
Enhancement
currently timestampwithtimezone do not take into account timezone l53 and l50 this might give similar result for different timezone
prestodbpresto
clean up columnconverter s gettypemetadata interface
Enhancement
while we be use string to represent type metadata it would be good to have a separate typemetadata class or even interface in the next pr pass string would be ambiguous to the interface the new typemetadata class could contain optional field if it be an interface we can also have encode and decode method out of it that can help we to remove many if optional ispresent branch originally post by highker in discussion r791316958