summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/RenderScriptGL.java
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2020-01-16 16:15:51 -0700
committerJeff Sharkey <jsharkey@android.com>2020-01-17 15:57:42 -0700
commit03475d9ae41258c298ed63aff119c31e0db658d0 (patch)
tree4661c7d0d4daad60aa1f378266f4cfe859ba0db9 /rs/java/android/renderscript/RenderScriptGL.java
parente709c6a401b54b14676d8632d520d5789f2916bd (diff)
Add custom scalar/aggregate functions to SQLite.
SQLite ships with a handful of basic functions, such as UPPER() as a scalar function and MAX() as a aggregate function. We now have several use-cases for adding custom functions, where it's otherwise prohibitively expensive to perform post-processing on the returned Cursor, as that requires copying processed data to yet another MatrixCursor before returning to apps. This change adds the ability for developers to register custom scalar and aggregate functions on databases that they've opened; some contrived examples are scalar functions like REVERSE() for reversing a string, or aggregate functions like STDDEV(). To give developers the most flexibility, we use the Java functional interfaces for defining these operations, as developers may already be familiar with the contracts of those methods. This also opens the door to quickly adapting existing code through utility methods like BinaryOperator.minBy(Comparator). Bug: 142564473 Test: atest CtsDatabaseTestCases:android.database.sqlite.cts.SQLiteDatabaseTest Change-Id: I9fa0e60ec77bab676396729cc9cb8ba8aaf56224
Diffstat (limited to 'rs/java/android/renderscript/RenderScriptGL.java')
0 files changed, 0 insertions, 0 deletions