Commit Graph

287 Commits

Author SHA1 Message Date
wangjiaming0909 1f71ce9409 feature: get last timestamp before create sma index 2023-07-06 10:33:22 +08:00
Haojun Liao 3b2f2f0a94 fix(test): fix link error in unit test. 2023-06-15 11:06:03 +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
Xiaoyu Wang 11306876fa feat: support writing streams to existing tables 2022-12-30 14:14:03 +08:00
Ganlin Zhao 17542879b2 add test cases 2022-12-15 10:55:11 +08:00
Xiaoyu Wang 2f9753c540 event window query 2022-12-13 14:18:03 +08:00
Xiaoyu Wang bc413b8fff feat: add stream option 'delete_mark' 2022-12-06 16:07:11 +08:00
Xiaoyu Wang 469fcd314e enh: ins_tables optimize 2022-11-21 18:44:04 +08:00
Xiaoyu Wang 40c7562470 enh: optimize statement for querying the number of sub tables of the super table 2022-11-15 16:38:51 +08:00
Xiaoyu Wang 8f7c0b8c60 fix: state_window error 2022-11-08 11:35:12 +08:00
Xiaoyu Wang 02ac6fa552 enh: add unit test and delete useless code 2022-10-26 17:01:55 +08:00
Xiaoyu Wang bd3c64d29e enh: interp support for stable 2022-10-25 14:52:07 +08:00
Xiaoyu Wang 0fdce91b5a fix: wrong permissions of 'show variables' command 2022-10-24 16:34:10 +08:00
Haojun Liao f7fdeecc44
Merge branch '3.0' into feature/3_liaohj 2022-10-19 11:23:55 +08:00
Xiaoyu Wang eaa2a344e1 fix: plan problem with 'partition by tag group by tag' statement 2022-10-18 15:01:52 +08:00
Xiaoyu Wang 0228caaa0d enh: last cache optimize 2022-10-18 11:38:59 +08:00
Xiaoyu Wang 3ed27805c3 fix: query information_schema.ins_tags error 2022-09-30 14:43:51 +08:00
Xiaoyu Wang 73642ac3a2 feat: sql command 'show table tags from table_name' 2022-09-29 16:16:49 +08:00
Xiaoyu Wang 48c9373680 enh: query information_schema.ins_tags optimize 2022-09-28 17:00:02 +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
Xiaoyu Wang 1d62834e5c feat(stream): tag and child table name improvement 2022-09-26 18:39:47 +08:00
Shengliang Guan f80068bbe6
Merge pull request #17011 from taosdata/feat/3.0_parser_planner
feat: case when expression
2022-09-23 11:41:57 +08:00
Xiaoyu Wang 50ebcb5006 feat: case when expression 2022-09-22 19:20:21 +08:00
Xiaoyu Wang 9f45f81aa0 fix: join validity check 2022-09-22 16:54:39 +08:00
Xiaoyu Wang 0321b8c088 fix: avg function data scan optimization 2022-09-22 15:08:07 +08:00
Xiaoyu Wang 5116e0a01b enh: added memory allocators for parser and planner 2022-09-21 17:04:12 +08:00
Xiaoyu Wang 8a010a58f3 enh: added memory allocators for parser and planner 2022-09-20 16:13:08 +08:00
Xiaoyu Wang 74f75893ea enh: physical plan serialization supports cross-platform 2022-09-19 15:56:14 +08:00
Xiaoyu Wang cf759fba42 fix: parsing conflicts 2022-09-16 19:54:46 +08:00
Shengliang Guan 6263c8fcc9
Merge pull request #16781 from taosdata/enh/3.0_planner_optimize
enh: add binary serialization method to node structure
2022-09-14 11:52:35 +08:00
Xiaoyu Wang d585c20aa3 enh: count(tbname) optimize 2022-09-13 18:58:56 +08:00
Xiaoyu Wang 82fcd22107 enh: add binary serialization method to node structure 2022-09-13 15:57:17 +08:00
Xiaoyu Wang f40d838fe7 enh: add binary serialization method to node structure 2022-09-13 15:07:31 +08:00
Xiaoyu Wang 3f5746d20b enh: add binary serialization method to node structure 2022-09-08 15:43:14 +08:00
Xiaoyu Wang e5aa7eeac6 enh: add binary serialization method to node structure 2022-09-07 16:48:54 +08:00
Xiaoyu Wang 5cfb023d01 enh: add binary serialization method to node structure 2022-09-06 17:26:37 +08:00
Xiaoyu Wang 417a29af0a fix: a plan problem of system table complex query 2022-08-30 14:32:07 +08:00
Xiaoyu Wang a39e6f7d92 enh: super table scan requires project operator to merge packets to improve performance 2022-08-29 14:01:18 +08:00
Xiaoyu Wang 63792daeeb fix: user permission error with sysinfo 0 2022-08-25 17:18:11 +08:00
Xiaoyu Wang eef595318d feat: system table visible permission 2022-08-24 19:08:50 +08:00
Xiaoyu Wang 79f005552e fix: fill clause error 2022-08-12 18:18:16 +08:00
Xiaoyu Wang 2ad70dff1e fix: output datablcok desc error 2022-08-12 17:08:32 +08:00
Haojun Liao dc991a9040 other:merge 3.0 2022-08-12 14:51:52 +08:00
Xiaoyu Wang 2e9cadfe89 fix: improve create stream check 2022-08-11 23:20:13 +08:00
Haojun Liao 0d60d54a4a other: merge 3.0 2022-08-06 15:26:15 +08:00
Haojun Liao 4cd7af0ecf other: merge 3.0 2022-08-03 19:02:43 +08:00
Xiaoyu Wang f8bd778979 enh: the fill physical scheme distinguishes between interpolated and non-interpolated expressions 2022-08-02 16:18:53 +08:00
dapan1121 517b03a6fc
Merge pull request #15663 from taosdata/enh/addAppStat
enh: support app level stat
2022-08-02 15:07:26 +08:00
dapan1121 596c86dd95 fix: fix case issue 2022-08-02 13:47:04 +08:00
Xiaoyu Wang a62a7cc41f enh: aggregate and window add field for merge data blocks 2022-08-01 21:05:44 +08:00