Type:
Task
Priority:
Critical
Resolution:
Fixed
Sprint:
10.3.1-1, 10.3.1-2, 10.3.3-1
With CREATE FUNCTION one can create functions in SQL, but this syntax doesn't allow one to create an aggregate function (like SUM , AVG , etc). This task is to add support for aggregate stored functions.
Syntax
is not decided yet. SQL Standard 2003 doesn't support aggregate stored functions (may be the newer standard does). Oracle , PostgreSQL , HSQL (may be more) all implement aggregate stored functions using their own incompatible syntax extensions. SQL Server and DB2 do not support creating new aggregate stored functions in SQL.
The syntax should at least allow for
the code to return the function value
the code to be called per row in a group, it accumulates data, does not return a value
storage that is preserved between calls within a group
and possibly
code to invoke between groups to reset the storage
code to remove data from the group (useful for window functions)
{"report":{"fcp":833.9000000953674,"ttfb":149.90000009536743,"pageVisibility":"visible","entityId":50498,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"e69cf9fb-7b3c-4ec9-b7ff-1a201e9adcf7","navigationType":0,"readyForUser":888.2000000476837,"redirectCount":0,"resourceLoadedEnd":1075.6000001430511,"resourceLoadedStart":154.70000004768372,"resourceTiming":[{"duration":234,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":154.70000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":154.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":388.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":233.59999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":155.10000014305115,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":155.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":388.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":263.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":155.20000004768372,"connectEnd":155.20000004768372,"connectStart":155.20000004768372,"domainLookupEnd":155.20000004768372,"domainLookupStart":155.20000004768372,"fetchStart":155.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":155.20000004768372,"responseEnd":418.60000014305115,"responseStart":418.60000014305115,"secureConnectionStart":155.20000004768372},{"duration":287.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/099b33461394b8015fc36c0a4b96e19f-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":155.20000004768372,"connectEnd":155.20000004768372,"connectStart":155.20000004768372,"domainLookupEnd":155.20000004768372,"domainLookupStart":155.20000004768372,"fetchStart":155.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":155.20000004768372,"responseEnd":442.7999999523163,"responseStart":442.7999999523163,"secureConnectionStart":155.20000004768372},{"duration":291,"initiatorType":"script","name":"https://jira.mariadb.org/s/94c15bff32baef80f4096a08aceae8bc-CDN/lu2bu7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":155.29999995231628,"connectEnd":155.29999995231628,"connectStart":155.29999995231628,"domainLookupEnd":155.29999995231628,"domainLookupStart":155.29999995231628,"fetchStart":155.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":155.29999995231628,"responseEnd":446.2999999523163,"responseStart":446.2999999523163,"secureConnectionStart":155.29999995231628},{"duration":291.60000014305115,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":155.5,"connectEnd":155.5,"connectStart":155.5,"domainLookupEnd":155.5,"domainLookupStart":155.5,"fetchStart":155.5,"redirectEnd":0,"redirectStart":0,"requestStart":155.5,"responseEnd":447.10000014305115,"responseStart":447.10000014305115,"secureConnectionStart":155.5},{"duration":292.2000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":155.5,"connectEnd":155.5,"connectStart":155.5,"domainLookupEnd":155.5,"domainLookupStart":155.5,"fetchStart":155.5,"redirectEnd":0,"redirectStart":0,"requestStart":155.5,"responseEnd":447.7000000476837,"responseStart":447.7000000476837,"secureConnectionStart":155.5},{"duration":292.7000000476837,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bu7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":155.70000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":155.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":448.40000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":293.10000014305115,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bu7/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":155.79999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":155.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":448.90000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":292.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":155.79999995231628,"connectEnd":155.79999995231628,"connectStart":155.79999995231628,"domainLookupEnd":155.79999995231628,"domainLookupStart":155.79999995231628,"fetchStart":155.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":155.79999995231628,"responseEnd":448.2000000476837,"responseStart":448.2000000476837,"secureConnectionStart":155.79999995231628},{"duration":293.09999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/3339d87fa2538a859872f2df449bf8d0-CDN/lu2bu7/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":155.90000009536743,"connectEnd":155.90000009536743,"connectStart":155.90000009536743,"domainLookupEnd":155.90000009536743,"domainLookupStart":155.90000009536743,"fetchStart":155.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":155.90000009536743,"responseEnd":449,"responseStart":449,"secureConnectionStart":155.90000009536743},{"duration":464.60000014305115,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":161.79999995231628,"connectEnd":161.79999995231628,"connectStart":161.79999995231628,"domainLookupEnd":161.79999995231628,"domainLookupStart":161.79999995231628,"fetchStart":161.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":161.79999995231628,"responseEnd":626.4000000953674,"responseStart":626.4000000953674,"secureConnectionStart":161.79999995231628},{"duration":913.7000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":161.90000009536743,"connectEnd":161.90000009536743,"connectStart":161.90000009536743,"domainLookupEnd":161.90000009536743,"domainLookupStart":161.90000009536743,"fetchStart":161.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":161.90000009536743,"responseEnd":1075.6000001430511,"responseStart":1075.6000001430511,"secureConnectionStart":161.90000009536743},{"duration":382.7999999523163,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":643.7000000476837,"connectEnd":643.7000000476837,"connectStart":643.7000000476837,"domainLookupEnd":643.7000000476837,"domainLookupStart":643.7000000476837,"fetchStart":643.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":643.7000000476837,"responseEnd":1026.5,"responseStart":1026.5,"secureConnectionStart":643.7000000476837},{"duration":279.40000009536743,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":813,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":813,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1092.4000000953674,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":24,"responseStart":150,"responseEnd":160,"domLoading":153,"domInteractive":1095,"domContentLoadedEventStart":1095,"domContentLoadedEventEnd":1129,"domComplete":1822,"loadEventStart":1823,"loadEventEnd":1824,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1077.7999999523163},{"name":"bigPipe.sidebar-id.end","time":1078.7000000476837},{"name":"bigPipe.activity-panel-pipe-id.start","time":1078.7999999523163},{"name":"bigPipe.activity-panel-pipe-id.end","time":1080.9000000953674},{"name":"activityTabFullyLoaded","time":1133}],"measures":[],"correlationId":"8b118e126efe92","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":79,"dbReadsTimeInMs":16,"dbConnsTimeInMs":23,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}