Daniel García Aubert
e7e3d612a1
Use strict mode in modules under lib folder (except lib/cartodb/models/resource-locator.js)
2018-10-23 17:45:42 +02:00
Eneko Lakasta
95d179835c
add to logs even if no overviews tables were used.
...
{usesOverviews:false}
2018-08-30 14:52:37 +02:00
Eneko Lakasta
7c52f504e5
add dataview type to overviews logs
2018-08-30 14:30:03 +02:00
Eneko Lakasta
c9d50c412d
add tests for dataviews
2018-08-29 18:00:13 +02:00
Eneko Lakasta
732f891850
refactor in order not to tamper the dataview results data
2018-08-29 15:06:48 +02:00
Eneko Lakasta
8ef260972d
add to log when overviews are being used in dataviews
2018-08-29 13:50:21 +02:00
Rafa de la Torre
e247e45f96
Qualify columns and improve if/else style
...
As suggested by Algunenano: qualify column names with the
table/subquery/cte to avoid name clashing, and polish the code style a
little.
2018-07-05 17:21:38 +02:00
Rafa de la Torre
a1807fd0c3
A better solution to the start-end problem
2018-07-05 12:39:26 +02:00
Rafa de la Torre
d937ce4982
Fix the min >= start and max <= end case (WIP)
...
This fixes the 'should get bins with min >= start and max <= end' test
case but probably breaks a number of other cases (those with no start
and/or no end).
2018-07-05 11:56:26 +02:00
IagoLast
3850bbb68e
Send dates as unix epoch instead strings in .mvt files
...
This commit creates a new ConfigAdapter used in vector maps instantiations.
This adapter generates a new sql query for ONE SINGLE LAYER (carto-vl currently only supports one layer per mvt)
where the date columns are wrapped into a epoch using the `date_part` function.
Due this mvt files are smaller since we use numbers instead strings to represent dates, this is also faster in carto-gl
where we interpolate linearly between 0 and 1 to create animations.
Notice we should add a parameter to make this transformation optional.
We also should take into account the epoch precission.
2018-05-31 17:49:40 +02:00
Simon Martín
eba68c56ef
handling pg_typeof undefined
2018-05-10 18:36:08 +02:00
Raul Marin
089be35b5d
Aggregation count: Do not return null categories
2018-03-08 18:13:20 +01:00
Rafa de la Torre
251fe96509
Cosmetic fix, as suggested in PR
2018-02-12 19:24:53 +01:00
Rafa de la Torre
065f56e161
Improve the speed of the aggregation dataview
...
Improve the performance of the aggregation dataview.
Instead of using a CTE (WITH) for filtered_source, which is only used in
one place to calculate ranks, inject it as a subquery.
This way the planner has a chance to ignore uneeded columns as well as
to parallelize the exectution of the window function (WindowAgg in the
query plan).
That is the part that takes most of the time of the query.
The improvement is about 20-40% in speed on PG10 with 4 cores.
2018-02-07 18:10:13 +01:00
Eneko Lakasta
2bd4c9e814
Merge pull request #851 from CartoDB/1259-category-widget-error-group-by-missing
...
use original column name in group by instead of alias
2018-01-29 15:38:07 +01:00
Simon Martín
8c839e214d
changing the value of string
2018-01-26 15:44:21 +01:00
Simon Martín
99421b613c
moving 'other' outside of the query allowing queries of different types
2018-01-26 15:24:21 +01:00
Simon Martín
bc7a556297
removing category cast to string in aggregation
2018-01-26 12:37:10 +01:00
Eneko Lakasta
220f1d6a73
use original column name in group by instead of alias
2018-01-18 15:27:54 +01:00
Raul Marin
031e1253ca
Numeric histograms: Avoid conflicts with 'bin' named columns
2017-12-22 17:12:57 +01:00
Raul Marin
8012d76b68
Timeseries: Avoid collisions with columns named 'timestamp'
2017-12-22 15:58:40 +01:00
Raul Marin
418f5faa11
Date histogram: Reduce the threshold to change in auto mode to 100
2017-12-19 12:09:14 +01:00
Raul Marin
bba6db9dbf
Date histogram: Add second, decade, century and millenium aggregations
2017-12-19 12:09:14 +01:00
Raul Marin
7c5b7641d8
Date histogram: Add missing GROUP BY column
2017-12-11 11:27:13 +01:00
Raul Marin
1b405e42c2
Date histogram optimizations
2017-12-11 11:27:13 +01:00
Raul Marin
088a8b81a6
Timeseries tests: Set timestamps to the start of the aggregations
...
Also, increase the end of the range check so it includes some data
2017-12-11 11:27:13 +01:00
Raul Marin
243e982bd6
Optimize formulae queries
2017-12-11 11:27:13 +01:00
Raul Marin
fcbf5ffcc5
Move sql helper functions to query-utils.js
2017-12-11 11:27:13 +01:00
Raul Marin
90c9ad18e0
Optimize histogram queries
2017-12-11 11:27:13 +01:00
Daniel García Aubert
743bb0723b
Add query param to define the number of categories to be ranked
2017-11-07 16:14:47 +01:00
Simon Martín
19e2515a8e
Merge pull request #749 from CartoDB/dataview-factory-refactor
...
Dataview factory refactor
2017-10-04 12:18:55 +02:00
Simon Martín
0a507d02bc
Merge branch 'master' into remove-list-dataview
2017-10-04 11:36:45 +02:00
Simon Martín
8fe31c45f3
fix 'this' scope with arrow function
2017-10-04 11:10:17 +02:00
Simon Martín
fe4c22d2ea
Merge branch 'master' into base-dataview-refactor
2017-10-04 11:08:43 +02:00
Simon Martín
d27cce915c
Merge pull request #747 from CartoDB/formula-dataview-refactor
...
Formula dataview refactor
2017-10-04 10:10:57 +02:00
Simon Martín
4fd3c99531
Merge pull request #746 from CartoDB/list-dataview-refactor
...
List dataview refactor
2017-10-02 17:28:54 +02:00
Simon Martín
1e4c63a6dc
Merge pull request #745 from CartoDB/aggregation-dataview-refactor
...
Aggregation dataview refactor
2017-10-02 17:24:12 +02:00
Raul Ochoa
78b75c7a88
Removes list dataview type
2017-09-28 10:47:44 +00:00
Simon
222cfb90fd
Removing 'self' vars using arrow functions
2017-09-18 12:20:59 +02:00
Simon
f63fab40ed
Removing 'self' vars using arrow functions
2017-09-18 11:34:18 +02:00
Daniel García Aubert
61ea05d1c2
Do not assign a value by default for special float values counters
2017-09-15 14:51:02 +02:00
Daniel García Aubert
64c3e68303
Fix double declaration of 'result'
2017-09-15 14:48:54 +02:00
Daniel García Aubert
d4bb4edd1d
Applyy extract method to check input options
2017-09-15 14:43:41 +02:00
Daniel García Aubert
419b29e609
Do not prefix with '_' template context
2017-09-15 14:43:26 +02:00
Daniel García Aubert
c7ed3d34e8
Use const instead of var to declare variables
2017-09-15 14:43:13 +02:00
Daniel García Aubert
1959a841fd
Use arrow function to take advantage of bound context
2017-09-15 14:26:22 +02:00
Daniel García Aubert
ef5049f28f
Use destructuring assignment to improve readability
2017-09-15 14:07:46 +02:00
Daniel García Aubert
d5d9044686
Use const keyword to declare variables
2017-09-15 14:05:23 +02:00
Daniel García Aubert
5d632d936e
Use ES6 class syntax
2017-09-15 14:04:09 +02:00
Daniel García Aubert
90c4796d4e
Remove empty line
2017-09-15 13:41:54 +02:00