{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2025,6,19]],"date-time":"2025-06-19T04:58:53Z","timestamp":1750309133438,"version":"3.41.0"},"reference-count":109,"publisher":"Association for Computing Machinery (ACM)","issue":"2","license":[{"start":{"date-parts":[[2024,4,10]],"date-time":"2024-04-10T00:00:00Z","timestamp":1712707200000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/www.acm.org\/publications\/policies\/copyright_policy#Background"}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["ACM Trans. Database Syst."],"published-print":{"date-parts":[[2024,6,30]]},"abstract":"<jats:p>\n            This article presents Sharing User-Defined Aggregate Function (SUDAF), a declarative framework that allows users to write User-defined Aggregate Functions (UDAFs) as mathematical expressions and use them in Structured Query Language statements.\n            <jats:sans-serif>SUDAF<\/jats:sans-serif>\n            rewrites partial aggregates of UDAFs using built-in aggregate functions and supports efficient dynamic caching and reusing of partial aggregates. Our experiments show that rewriting UDAFs using built-in functions can significantly speed up queries with UDAFs, and the proposed sharing approach can yield up to two orders of magnitude improvement in query execution time. The article studies also an extension of\n            <jats:sans-serif>SUDAF<\/jats:sans-serif>\n            to support sharing partial results between arbitrary queries with UDAFs. We show a connection with the problem of query rewriting using views and introduce a new class of rewritings, called\n            <jats:sans-serif>SUDAF<\/jats:sans-serif>\n            rewritings, which enables to use views that have aggregate functions different from the ones used in the input query. We investigate the underlying rewriting-checking and rewriting-existing problem. Our main technical result is a reduction of these problems to, respectively, rewriting-checking and rewriting-existing of the so-called\n            <jats:italic>aggregate candidates<\/jats:italic>\n            , a class of rewritings that has been deeply investigated in the literature.\n          <\/jats:p>","DOI":"10.1145\/3649133","type":"journal-article","created":{"date-parts":[[2024,2,24]],"date-time":"2024-02-24T11:20:52Z","timestamp":1708773652000},"page":"1-46","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":0,"title":["Sharing Queries with Nonequivalent User-defined Aggregate Functions"],"prefix":"10.1145","volume":"49","author":[{"ORCID":"https:\/\/orcid.org\/0000-0003-4972-9380","authenticated-orcid":false,"given":"Chao","family":"Zhang","sequence":"first","affiliation":[{"name":"University of Waterloo, Waterloo, Canada"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-5086-3301","authenticated-orcid":false,"given":"Toumani","family":"Farouk","sequence":"additional","affiliation":[{"name":"LIMOS, CNRS, University of Clermont Auvergne, Clermont-Ferrand, France"}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"320","published-online":{"date-parts":[[2024,4,10]]},"reference":[{"key":"e_1_3_3_2_2","doi-asserted-by":"publisher","DOI":"10.1016\/j.jcss.2010.10.003"},{"key":"e_1_3_3_3_2","doi-asserted-by":"publisher","DOI":"10.5555\/645922.673497"},{"key":"e_1_3_3_4_2","unstructured":"Apache Flink. 2023. Retrieved from https:\/\/flink.apache.org"},{"key":"e_1_3_3_5_2","unstructured":"Apache Hadoop. 2023. Retrieved from https:\/\/hadoop.apache.org"},{"key":"e_1_3_3_6_2","unstructured":"Apache Hive. 2023. Retrieved from https:\/\/hive.apache.org"},{"key":"e_1_3_3_7_2","unstructured":"Apache Parquet. 2023. Retrieved from https:\/\/parquet.apache.org\/"},{"key":"e_1_3_3_8_2","unstructured":"Apache Spark. 2023. Retrieved from https:\/\/spark.apache.org\/"},{"key":"e_1_3_3_9_2","doi-asserted-by":"publisher","DOI":"10.1016\/B978-012088469-8.50032-2"},{"key":"e_1_3_3_10_2","doi-asserted-by":"publisher","DOI":"10.1145\/2723372.2742797"},{"key":"e_1_3_3_11_2","first-page":"659","volume-title":"Proceedings of the 24th International Conference on Very Large Data Bases","author":"Bello Randall G.","year":"1998","unstructured":"Randall G. Bello, Karl Dias, Alan Downing, James J. Feenan, James L. Finnerty, William D. Norcott, Harry Sun, Andrew Witkowski, and Mohamed Ziauddin. 1998. Materialized views in oracle. In Proceedings of the 24th International Conference on Very Large Data Bases. 659\u2013664."},{"key":"e_1_3_3_12_2","doi-asserted-by":"publisher","DOI":"10.14778\/3352063.3352073"},{"key":"e_1_3_3_13_2","volume-title":"Proceedings of the 12th Conference on Innovative Data Systems Research","author":"Blacher Mark","year":"2022","unstructured":"Mark Blacher, Joachim Giesen, S\u00f6ren Laue, Julien Klaus, and Viktor Leis. 2022. Machine learning, linear algebra, and more: Is SQL all you need? In Proceedings of the 12th Conference on Innovative Data Systems Research."},{"key":"e_1_3_3_14_2","volume-title":"Proceedings of the 2nd Biennial Conference on Innovative Data Systems Research","author":"Boncz Peter A.","year":"2005","unstructured":"Peter A. Boncz, Marcin Zukowski, and Niels Nes. 2005. MonetDB\/X100: Hyper-pipelining query execution. In Proceedings of the 2nd Biennial Conference on Innovative Data Systems Research."},{"key":"e_1_3_3_15_2","unstructured":"Central moments. 2023. Retrieved from https:\/\/en.wikipedia.org\/wiki\/Central_moment"},{"key":"e_1_3_3_16_2","doi-asserted-by":"publisher","DOI":"10.1145\/248603.248616"},{"key":"e_1_3_3_17_2","doi-asserted-by":"publisher","DOI":"10.5555\/645920.672834"},{"key":"e_1_3_3_18_2","doi-asserted-by":"publisher","DOI":"10.1007\/BFb0014151"},{"key":"e_1_3_3_19_2","doi-asserted-by":"publisher","DOI":"10.1145\/1066157.1066188"},{"key":"e_1_3_3_20_2","doi-asserted-by":"publisher","DOI":"10.1145\/1142473.1142480"},{"key":"e_1_3_3_21_2","doi-asserted-by":"publisher","DOI":"10.1145\/1138394.1138400"},{"key":"e_1_3_3_22_2","doi-asserted-by":"publisher","DOI":"10.1145\/1219092.1219093"},{"key":"e_1_3_3_23_2","doi-asserted-by":"publisher","DOI":"10.1145\/303976.303992"},{"key":"e_1_3_3_24_2","unstructured":"CREATE AGGREGATE. 2023. Retrieved from https:\/\/www.postgresql.org\/docs\/current\/sql-createaggregate.html"},{"key":"e_1_3_3_25_2","doi-asserted-by":"publisher","DOI":"10.14778\/2824032.2824045"},{"key":"e_1_3_3_26_2","first-page":"197","volume-title":"Proceedings of the 13th International Conference on Very Large Data Bases","author":"Dayal Umeshwar","year":"1987","unstructured":"Umeshwar Dayal. 1987. Of Nests and trees: A unified approach to processing queries that contain nested subqueries, aggregates, and quantifiers. In Proceedings of the 13th International Conference on Very Large Data Bases. 197\u2013208."},{"key":"e_1_3_3_27_2","first-page":"137","volume-title":"Proceedings of the 6th USENIX Symposium on Operating System Design and Implementation","author":"Dean Jeffrey","year":"2004","unstructured":"Jeffrey Dean and Sanjay Ghemawat. 2004. MapReduce: Simplified data processing on large clusters. In Proceedings of the 6th USENIX Symposium on Operating System Design and Implementation. 137\u2013150."},{"key":"e_1_3_3_28_2","doi-asserted-by":"publisher","DOI":"10.1145\/276304.276328"},{"key":"e_1_3_3_29_2","doi-asserted-by":"publisher","DOI":"10.1016\/j.is.2018.05.002"},{"key":"e_1_3_3_30_2","volume-title":"Proceedings of the 10th Conference on Innovative Data Systems Research","author":"Duta Christian","year":"2020","unstructured":"Christian Duta, Denis Hirn, and Torsten Grust. 2020. Compiling PL\/SQL away. In Proceedings of the 10th Conference on Innovative Data Systems Research."},{"key":"e_1_3_3_31_2","doi-asserted-by":"publisher","DOI":"10.1007\/s00778-017-0476-3"},{"key":"e_1_3_3_32_2","doi-asserted-by":"publisher","DOI":"10.1145\/3035918.3058747"},{"key":"e_1_3_3_33_2","doi-asserted-by":"publisher","DOI":"10.1145\/2882903.2882926"},{"key":"e_1_3_3_34_2","unstructured":"Embedded Python. 2023. Retrieved from https:\/\/www.monetdb.org\/documentation-Jun2023\/dev-guide\/sql-extensions\/embedded-python\/"},{"key":"e_1_3_3_35_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICDE.2015.7113292"},{"key":"e_1_3_3_36_2","doi-asserted-by":"publisher","DOI":"10.14778\/3611540.3611574"},{"key":"e_1_3_3_37_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICDE55515.2023.00276"},{"key":"e_1_3_3_38_2","doi-asserted-by":"publisher","DOI":"10.14778\/3554821.3554886"},{"key":"e_1_3_3_39_2","doi-asserted-by":"publisher","DOI":"10.14778\/3547305.3547328"},{"key":"e_1_3_3_40_2","doi-asserted-by":"publisher","DOI":"10.1145\/376284.375748"},{"key":"e_1_3_3_41_2","doi-asserted-by":"publisher","DOI":"10.14778\/3236187.3236212"},{"key":"e_1_3_3_42_2","doi-asserted-by":"publisher","DOI":"10.1145\/375663.375706"},{"key":"e_1_3_3_43_2","doi-asserted-by":"publisher","DOI":"10.1016\/j.ins.2010.08.043"},{"key":"e_1_3_3_44_2","doi-asserted-by":"publisher","DOI":"10.1109\/69.273032"},{"key":"e_1_3_3_45_2","first-page":"19","article-title":"The cascades framework for query optimization","volume":"18","author":"Graefe Goetz","year":"1995","unstructured":"Goetz Graefe. 1995. The cascades framework for query optimization. IEEE Data Eng. Bull. 18 (1995), 19\u201329.","journal-title":"IEEE Data Eng. Bull."},{"key":"e_1_3_3_46_2","doi-asserted-by":"publisher","DOI":"10.1023\/A:1009726021843"},{"key":"e_1_3_3_47_2","doi-asserted-by":"publisher","DOI":"10.1145\/303976.303994"},{"key":"e_1_3_3_48_2","doi-asserted-by":"publisher","DOI":"10.1007\/s00236-004-0101-y"},{"key":"e_1_3_3_49_2","doi-asserted-by":"publisher","DOI":"10.1016\/S0022-0000(02)00033-8"},{"key":"e_1_3_3_50_2","doi-asserted-by":"publisher","DOI":"10.5555\/645921.673150"},{"key":"e_1_3_3_51_2","doi-asserted-by":"publisher","DOI":"10.1145\/3318464.3389736"},{"key":"e_1_3_3_52_2","volume-title":"Proceedings of the 11th Conf. on Innovative Data Systems Research","author":"Hagedorn Stefan","year":"2021","unstructured":"Stefan Hagedorn, Steffen Kl\u00e4be, and Kai-Uwe Sattler. 2021. Putting pandas in a box. In Proceedings of the 11th Conf. on Innovative Data Systems Research."},{"key":"e_1_3_3_53_2","doi-asserted-by":"publisher","DOI":"10.1145\/3448016.3457272"},{"key":"e_1_3_3_54_2","doi-asserted-by":"publisher","DOI":"10.1145\/1247480.1247535"},{"key":"e_1_3_3_55_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICDE.2013.6544927"},{"key":"e_1_3_3_56_2","unstructured":"IBM DB2. 2023. Retrieved from https:\/\/www.ibm.com\/analytics\/db2"},{"issue":"1","key":"e_1_3_3_57_2","first-page":"40","article-title":"MonetDB: Two decades of research in column-oriented database architectures","volume":"35","author":"Idreos Stratos","year":"2012","unstructured":"Stratos Idreos, Fabian Groffen, Niels Nes, Stefan Manegold, K. Sjoerd Mullender, and Martin L. Kersten. 2012. MonetDB: Two decades of research in column-oriented database architectures. IEEE Data Eng. Bull. 35, 1 (2012), 40\u201345.","journal-title":"IEEE Data Eng. Bull."},{"key":"e_1_3_3_58_2","doi-asserted-by":"publisher","unstructured":"Telecom Italia. 2015. Telecommunications\u2014SMS Call Internet\u2014MI. Retrieved from https:\/\/dataverse.harvard.edu\/dataset.xhtml?persistentId=doi:10.7910\/DVN\/EGZHFV. 10.7910\/DVN\/EGZHFV","DOI":"10.7910\/DVN\/EGZHFV"},{"key":"e_1_3_3_59_2","doi-asserted-by":"publisher","DOI":"10.1145\/276304.276338"},{"key":"e_1_3_3_60_2","volume-title":"Proceedings of the 10th Conference on Innovative Data Systems Research","author":"Karanasos Konstantinos","year":"2020","unstructured":"Konstantinos Karanasos, Matteo Interlandi, Fotis Psallidas, Rathijit Sen, Kwanghyun Park, Ivan Popivanov, Doris Xin, Supun Nakandala, Subru Krishnan, Markus Weimer, Yuan Yu, Raghu Ramakrishnan, and Carlo Curino. 2020. Extending relational query processing with ML Inference. In Proceedings of the 10th Conference on Innovative Data Systems Research."},{"key":"e_1_3_3_61_2","doi-asserted-by":"publisher","DOI":"10.1145\/319732.319745"},{"key":"e_1_3_3_62_2","volume-title":"Proceedings of the 12th Conference on Innovative Data Systems Research","author":"Kl\u00e4be Steffen","year":"2022","unstructured":"Steffen Kl\u00e4be, Robert DeSantis, Stefan Hagedorn, and Kai-Uwe Sattler. 2022. Accelerating python UDFs in vectorized query execution. In Proceedings of the 12th Conference on Innovative Data Systems Research."},{"key":"e_1_3_3_63_2","doi-asserted-by":"publisher","DOI":"10.1145\/3448016.3457288"},{"key":"e_1_3_3_64_2","doi-asserted-by":"publisher","DOI":"10.1145\/1142473.1142543"},{"key":"e_1_3_3_65_2","doi-asserted-by":"publisher","DOI":"10.1145\/3035918.3054775"},{"key":"e_1_3_3_66_2","doi-asserted-by":"publisher","DOI":"10.1109\/CGO.2004.1281665"},{"key":"e_1_3_3_67_2","doi-asserted-by":"publisher","DOI":"10.5555\/645920.672839"},{"key":"e_1_3_3_68_2","first-page":"1","volume-title":"Proceedings of the 22nd International Conference on Data Engineering","author":"L\u00edn V\u00e1clav","year":"2006","unstructured":"V\u00e1clav L\u00edn, Vasilis Vassalos, and Prodromos Malakasiotis. 2006. MiniCount: Efficient rewriting of COUNT-queries using views. In Proceedings of the 22nd International Conference on Data Engineering. 1\u20131."},{"key":"e_1_3_3_69_2","volume-title":"Aggregation Functions","author":"Marichal Radko Mesiar Michel Grabisch, Jean-Luc","year":"2009","unstructured":"Radko Mesiar Michel Grabisch, Jean-Luc Marichal and Endre Pap. 2009. Aggregation Functions. Cambridge University Press, Cambridge, UK."},{"key":"e_1_3_3_70_2","doi-asserted-by":"publisher","DOI":"10.14778\/3402707.3402723"},{"key":"e_1_3_3_71_2","unstructured":"Moment-based quantile sketches for aggregations. 2018. Retrieved from https:\/\/github.com\/stanford-futuredata\/msketch"},{"key":"e_1_3_3_72_2","doi-asserted-by":"publisher","DOI":"10.1145\/93605.98734"},{"key":"e_1_3_3_73_2","doi-asserted-by":"publisher","DOI":"10.1145\/191839.191860"},{"key":"e_1_3_3_74_2","doi-asserted-by":"publisher","DOI":"10.5555\/645918.756653"},{"key":"e_1_3_3_75_2","doi-asserted-by":"publisher","DOI":"10.5555\/1182635.1164217"},{"key":"e_1_3_3_76_2","volume-title":"An Evaluation of Compilation-Based PL\/PGSQL Execution","author":"Nayak Tanuj","year":"2021","unstructured":"Tanuj Nayak. 2021. An Evaluation of Compilation-Based PL\/PGSQL Execution. Ph. D. Dissertation. Carnegie Mellon University Pittsburgh, PA."},{"key":"e_1_3_3_77_2","doi-asserted-by":"publisher","DOI":"10.1145\/275487.275512"},{"key":"e_1_3_3_78_2","unstructured":"Oracle. 2023. Retrieved from https:\/\/docs.oracle.com\/"},{"key":"e_1_3_3_79_2","doi-asserted-by":"publisher","DOI":"10.14778\/3213880.3213890"},{"key":"e_1_3_3_80_2","unstructured":"Kwanghyun Park Karla Saur Dalitso Banda Rathijit Sen Matteo Interlandi and Konstantinos Karanasos. 2022. End-to-end optimization of machine learning prediction queries. Retrieved from https:\/\/arxiv.org\/abs\/2206.00136"},{"key":"e_1_3_3_81_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICDE.2016.7498249"},{"key":"e_1_3_3_82_2","unstructured":"PostgreSQL. 2023. https:\/\/www.postgresql.org\/docs\/"},{"key":"e_1_3_3_83_2","doi-asserted-by":"publisher","DOI":"10.1145\/3514221.3526055"},{"key":"e_1_3_3_84_2","unstructured":"PSQL. 2023. Retrieved from https:\/\/docs.singlestore.com\/cloud\/reference\/sql-reference\/procedural-sql-reference\/create-aggregate\/"},{"key":"e_1_3_3_85_2","doi-asserted-by":"publisher","DOI":"10.1145\/2949689.2949703"},{"key":"e_1_3_3_86_2","doi-asserted-by":"publisher","DOI":"10.14778\/3352063.3352072"},{"key":"e_1_3_3_87_2","doi-asserted-by":"publisher","DOI":"10.1145\/3186728.3164140"},{"key":"e_1_3_3_88_2","doi-asserted-by":"publisher","DOI":"10.14778\/3415478.3415515"},{"key":"e_1_3_3_89_2","doi-asserted-by":"publisher","DOI":"10.1145\/3299869.3324961"},{"key":"e_1_3_3_90_2","first-page":"40","volume-title":"Proceedings of the 26th International Conference on Extending Database Technology","author":"Sch\u00fcle Maximilian E.","year":"2023","unstructured":"Maximilian E. Sch\u00fcle, Luca Scalerandi, Alfons Kemper, and Thomas Neumann. 2023. Blue elephants inspecting pandas: Inspection and execution of machine learning pipelines in SQL. In Proceedings of the 26th International Conference on Extending Database Technology. 40\u201352."},{"key":"e_1_3_3_91_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICDE.1996.492194"},{"key":"e_1_3_3_92_2","doi-asserted-by":"publisher","DOI":"10.14778\/3510397.3510408"},{"key":"e_1_3_3_93_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICDE.2014.6816679"},{"key":"e_1_3_3_94_2","doi-asserted-by":"publisher","DOI":"10.1007\/978-0-387-48901-8"},{"key":"e_1_3_3_95_2","doi-asserted-by":"publisher","DOI":"10.1145\/3448016.3457244"},{"key":"e_1_3_3_96_2","unstructured":"SQLite. 2023. Retrieved from https:\/\/www.sqlite.org\/index.html"},{"key":"e_1_3_3_97_2","doi-asserted-by":"publisher","DOI":"10.5555\/645922.673627"},{"key":"e_1_3_3_98_2","unstructured":"Standardized moments. 2023. Retrieved from https:\/\/en.wikipedia.org\/wiki\/Standardized_moment"},{"key":"e_1_3_3_99_2","unstructured":"User Defined Aggregate Functions. 2023. Retrieved from https:\/\/spark.apache.org\/docs\/latest\/sql-ref-functions-udf-ggregate.html"},{"key":"e_1_3_3_100_2","doi-asserted-by":"publisher","DOI":"10.1145\/3400903.3400932"},{"key":"e_1_3_3_101_2","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-44543-9_4"},{"key":"e_1_3_3_102_2","doi-asserted-by":"publisher","DOI":"10.1145\/3035918.3064051"},{"key":"e_1_3_3_103_2","unstructured":"Wolfram Mathematica. 2023. Retrieved from https:\/\/reference.wolfram.com\/language\/guide\/MathematicalFunctions"},{"key":"e_1_3_3_104_2","doi-asserted-by":"publisher","DOI":"10.5555\/1191547.1191747"},{"key":"e_1_3_3_105_2","doi-asserted-by":"publisher","DOI":"10.5555\/645921.673154"},{"key":"e_1_3_3_106_2","unstructured":"YeSQL: Rich and fast user-defined functions in relational databases. 2023. Retrieved from https:\/\/github.com\/athenarc\/YeSQL"},{"key":"e_1_3_3_107_2","doi-asserted-by":"publisher","DOI":"10.1145\/3592980.3595307"},{"key":"e_1_3_3_108_2","first-page":"241","volume-title":"Proceedings of the 23rd International Conference on Extending Database Technology","author":"Zhang Chao","year":"2020","unstructured":"Chao Zhang and Farouk Toumani. 2020. Sharing computations for user-defined aggregate functions. In Proceedings of the 23rd International Conference on Extending Database Technology. 241\u2013252."},{"key":"e_1_3_3_109_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICDE48307.2020.00161"},{"key":"e_1_3_3_110_2","doi-asserted-by":"publisher","DOI":"10.1145\/1066157.1066192"}],"container-title":["ACM Transactions on Database Systems"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3649133","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3649133","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,18]],"date-time":"2025-06-18T22:50:01Z","timestamp":1750287001000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3649133"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2024,4,10]]},"references-count":109,"journal-issue":{"issue":"2","published-print":{"date-parts":[[2024,6,30]]}},"alternative-id":["10.1145\/3649133"],"URL":"https:\/\/doi.org\/10.1145\/3649133","relation":{},"ISSN":["0362-5915","1557-4644"],"issn-type":[{"type":"print","value":"0362-5915"},{"type":"electronic","value":"1557-4644"}],"subject":[],"published":{"date-parts":[[2024,4,10]]},"assertion":[{"value":"2022-12-02","order":0,"name":"received","label":"Received","group":{"name":"publication_history","label":"Publication History"}},{"value":"2024-01-24","order":1,"name":"accepted","label":"Accepted","group":{"name":"publication_history","label":"Publication History"}},{"value":"2024-04-10","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}