{"title":"实现复杂计算的另一种方法是:函数式SQL UDF","authors":"C. Duta","doi":"10.1145/3546930.3547508","DOIUrl":null,"url":null,"abstract":"Whenever data-intensive computation gets so complex that it requires the use of iteration or recursion, SQL developers turn towards recursive common table expressions (CTEs). We present the results of a user study that shows how developers struggle with the unusual fixpoint semantics and awkward monolithic syntactic structure of CTEs. The study suggests that recursive user-defined functions (UDFs)---written in a style much like regular functional programs---are less prone to errors, significantly more readable, and can be authored more quickly. Since such recursive UDFs can be automatically compiled into efficiently executable CTEs, we put functional-style UDFs forward as another promising pillar to express complex computation close to the data.","PeriodicalId":92279,"journal":{"name":"Proceedings of the 2nd Workshop on Human-In-the-Loop Data Analytics. Workshop on Human-In-the-Loop Data Analytics (2nd : 2017 : Chicago, Ill.)","volume":"4 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2022-06-12","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":"{\"title\":\"Another way to implement complex computations: functional-style SQL UDF\",\"authors\":\"C. Duta\",\"doi\":\"10.1145/3546930.3547508\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Whenever data-intensive computation gets so complex that it requires the use of iteration or recursion, SQL developers turn towards recursive common table expressions (CTEs). We present the results of a user study that shows how developers struggle with the unusual fixpoint semantics and awkward monolithic syntactic structure of CTEs. The study suggests that recursive user-defined functions (UDFs)---written in a style much like regular functional programs---are less prone to errors, significantly more readable, and can be authored more quickly. Since such recursive UDFs can be automatically compiled into efficiently executable CTEs, we put functional-style UDFs forward as another promising pillar to express complex computation close to the data.\",\"PeriodicalId\":92279,\"journal\":{\"name\":\"Proceedings of the 2nd Workshop on Human-In-the-Loop Data Analytics. Workshop on Human-In-the-Loop Data Analytics (2nd : 2017 : Chicago, Ill.)\",\"volume\":\"4 1\",\"pages\":\"\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2022-06-12\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"1\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the 2nd Workshop on Human-In-the-Loop Data Analytics. Workshop on Human-In-the-Loop Data Analytics (2nd : 2017 : Chicago, Ill.)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/3546930.3547508\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 2nd Workshop on Human-In-the-Loop Data Analytics. Workshop on Human-In-the-Loop Data Analytics (2nd : 2017 : Chicago, Ill.)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3546930.3547508","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Another way to implement complex computations: functional-style SQL UDF
Whenever data-intensive computation gets so complex that it requires the use of iteration or recursion, SQL developers turn towards recursive common table expressions (CTEs). We present the results of a user study that shows how developers struggle with the unusual fixpoint semantics and awkward monolithic syntactic structure of CTEs. The study suggests that recursive user-defined functions (UDFs)---written in a style much like regular functional programs---are less prone to errors, significantly more readable, and can be authored more quickly. Since such recursive UDFs can be automatically compiled into efficiently executable CTEs, we put functional-style UDFs forward as another promising pillar to express complex computation close to the data.