Commit Graph

38 Commits

Author SHA1 Message Date
Shengliang Guan 3003e7286e feat: data analysis 2024-10-15 10:00:38 +08:00
Shengliang Guan 9f05ca5ee8 revert: data analysis 2024-10-14 23:27:11 +08:00
Shengliang Guan 4dc0c2f47e feat: data analysis 2024-10-09 17:09:43 +08:00
Jing Sima 4a8bbc36bd feat:[TS-4893] refactor of rand function. 2024-09-09 18:48:24 +08:00
Jing Sima a249bef104 feat:[TS-4893] Add random and support use min/max on string column. 2024-09-09 18:48:24 +08:00
factosea 5f0ac46029 diff 2024-07-04 11:04:59 +08:00
wangjiaming0909 fa85d1caa7 support other tsma funcs 2024-04-16 14:23:25 +08:00
wangjiaming0909 cc9550f45e add tsma funcs 2024-04-16 14:20:59 +08:00
dapan1121 55d118d17c Merge remote-tracking branch 'origin/3.0' into feat/TD-27337 2024-04-16 09:12:04 +08:00
dapan1121 8407eb3791 enh: outer join performance optimization 2024-04-09 09:48:38 +08:00
shenglian zhou cee96e2048 feat: begin coding function 2024-03-19 13:57:12 +08:00
wangjiaming0909 1e53e6cfeb optimize count()/last() + partition by tbname/tag 2023-09-19 14:56:02 +08:00
dapan1121 4dae9f4eff merge main to 3.0 2023-06-26 18:43:00 +08:00
Dingle Zhang 984211f3b4
Feature/3.0 geometry (#21037)
* Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far.

* add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling

* change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh

* Add a function MakePoint() and introduce a lib geometry

* implement sql functions GeomFromText() and AsText()

* Use GEOS *_r funcions instead for thread safety

* Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT.
Add geosWrapper to wrap the basic GEOS functions for TDEngine.

* refactor AsText and MakePoint functions to be like GeomFromText

* Show WKT when print geometry data in screen
Dump hex data when dump geometry data in a file

* define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues.

* set number of decimals of WKT to 6

* Implement SQL function Intersects()

* refactor geometry sql functions

* Add geosErrMsgeHandler() to get the GEOS error detail

* use threadlocal to instantiate SGeosContext
call destroyGeosContext() only if the thread exists

* remove SGeosContext *context param for all geometry functions since we use thread local one,
so that all caller do not need to know the context.

* Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance.

* rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn

* Add prefix "ST_" for all geometry functions

* move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util,
so that all unit test tools can compile

* Add unit test for geometry lib, only test MakePoint so far

* refactor and enhance existing cases in geomFuncTest

* implement NULL type and NULL value test for geomFuncTest

* add test on geomFromText()

* add unit test on AsText() in geomFuncTest

* combine some makePointFunction test items

* add intersectsFunctionTwoColumns test
refactor on callGeomFromTextWrapper functions

* enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content

* add more cases into intersectsFunction test

* Add basic test on geometry in system test

* Add ST_GeomFromText and ST_AsText function test in system test on geometry

* add ST_Intersects function test in system test on geometry

* support to check expectedErrno in system test on geometry

* adjust geomTest unit test and geometry system test

* add geometry data type and functions in doc english version

* implement touchesFunction() in geometry lib
refactor geometry relation functions model

* separate gemFuncTest into several src files

* add unit test on touchesFunction

* support sql function ST_Touches()
add system test on ST_Touches

* add docs for ST_Touches()

* Add ST_Contains()

* Add ST_Covers()

* Add ST_Equals()

* add swapAllowed param for geomRelationFunction()
read geom2 earlier intead of at doGeosRelation()

* Add ST_ContainsProperly()

* build on windows

* Merge from 3.0 to 3.0_geometry

* change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility

* change '\\NULL' to 'NULL' back in shellDumpFieldToFile()

* add /usr/local/include into include directory

* add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 15:36:46 +08:00
dapan1121 af6a9aeb13 fix: remove interp stable limitation and add test case 2022-10-24 17:46:21 +08:00
Xiaoyu Wang 8caa36299c feat: add the _irowts pseudo column to output the timestamp of the interp 2022-09-27 15:23:24 +08:00
Ganlin Zhao c017e4387f fix(query): forbid interp in super table query
TD-18331
2022-08-11 16:17:38 +08:00
Xiaoyu Wang 41b8ef7d93 enh: cumulative functions support mixed use 2022-07-29 18:00:48 +08:00
Xiaoyu Wang 958f3586c0 fix: the problem of data loss when interval is used for outer query 2022-07-22 11:41:18 +08:00
Xiaoyu Wang aec4c2313a fix: multi-rows function validity check 2022-07-15 16:17:00 +08:00
Xiaoyu Wang 4830b7d9d3 feat: support pseudo columns such as _qstart, _qend and _qduration 2022-07-13 18:12:02 +08:00
Xiaoyu Wang 8a8939f99c fix: csum/diff/mavg support subquery 2022-07-01 13:31:22 +08:00
Xiaoyu Wang ae076af4f1 feat: sql system info function 'database()', 'client_version()', 'server_version()', 'server_status()', 'current_user()' and 'user()' 2022-06-29 11:41:32 +08:00
Xiaoyu Wang 04e9996db6 feat: the function manager adds an interface for manually configuring the parameters of the merge function 2022-06-18 20:52:42 +08:00
Xiaoyu Wang e224d40480 feat: the unique function and tail function are rewritten as the corresponding clauses 2022-06-16 16:58:55 +08:00
Haojun Liao 771065952e other: merge 3.0 2022-06-15 16:32:28 +08:00
Haojun Liao 531b85ce22 enh(query): add interp function. 2022-06-14 11:54:13 +08:00
Xiaoyu Wang 3954edb366 feat: avg function rewrite 2022-06-13 18:36:23 +08:00
Xiaoyu Wang e17396be9c fix: some problems of parser 2022-06-11 15:44:49 +08:00
Xiaoyu Wang 4432fa930f feat: parser adapts asynchronous interface 2022-05-28 19:56:06 +08:00
Xiaoyu Wang 8da52cbb04 feat: tag index filter plan 2022-05-23 19:50:08 +08:00
Xiaoyu Wang 4c914c2960 fix: problem of parser and planner 2022-05-09 20:20:05 +08:00
Xiaoyu Wang 3b4f9b91cf feat: sql commadn 'select max(c1), c2 from t2' 2022-05-01 08:38:17 +08:00
Xiaoyu Wang ac754dce90 fix: some problems of tag query and sma 2022-04-26 18:15:06 +08:00
Xiaoyu Wang 14e9fa355c fix: some problems of udf and 'create table' 2022-04-25 17:57:14 +08:00
Xiaoyu Wang 6f377189d0 feat: sql command 'create function' 2022-04-20 17:43:02 +08:00
Xiaoyu Wang 0ef0e1655b TD-13338 SELECT statement translate code 2022-02-08 20:03:32 -05:00
Xiaoyu Wang a0a61fa91d TD-13120 SELECT statement data structure definition 2022-01-19 21:51:23 -05:00