Commit Graph

36 Commits

Author SHA1 Message Date
Shengliang Guan d8858a5113 Merge remote-tracking branch 'suzp1984/fix/3.0-compile-error-macos' into feat/contrib3 2024-11-04 11:06:15 +08:00
Jinqing Kuang 647066c4f9 enh(query)[TD-32652]: enable AVX implementation with CPU dispatching
Extract AVX implementation of specific functions into separate files.
The CPU dispatching mechanism will now check the machine's instruction
set at runtime to determine whether to use the AVX implementation or
fallback to the naive version.

This enhancement improves performance on most machines while ensuring
compatibility with older hardwares.
2024-11-01 12:44:59 +08:00
Shengliang Guan 81c30ab7c0 fix: format cmake file 2024-10-24 10:10:07 +08:00
Jacob Su 195ace04b8 fix compile errors on macOS 14.4 m2 chip. 2024-04-23 14:21:14 +08:00
Haojun Liao cea8334427
Merge pull request #21449 from taosdata/refact/fillhistory
refactor: remove the module dependency.  TD-24279
2023-05-26 09:01:45 +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
Haojun Liao e67b532d8a refactor: refactor the module dependency. 2023-05-23 18:29:23 +08:00
Alex Duan c34c53539d test: add udf2_dup test case 2023-04-20 14:32:32 +08:00
Alex Duan ba0a6e087f test: add the cast that select field include two udf function 2023-04-20 13:51:39 +08:00
Haojun Liao 9f5cf450de refactor: do some internal refactor. 2022-11-10 15:37:18 +08:00
Shuduo Sang 7a8c2efbc3
fix: add jemalloc as build dependency of taosd, udf and shell (#17785)
* fix: jemalloc compile error

* fix: jemalloc compile error

* fix: add jemalloc as dependency of taosd and udf

Co-authored-by: afwerar <1296468573@qq.com>
2022-11-01 13:44:04 +08:00
Hongze Cheng 746da9fd27 make it compile 2022-10-12 13:49:40 +08:00
Hongze Cheng 52bf961622 more code 2022-10-12 11:09:42 +08:00
Liu Jicong 4c6a8bbc95 feat(stream): stream state support tuple 2022-09-14 16:50:42 +08:00
Xiaoyu Wang 4432fa930f feat: parser adapts asynchronous interface 2022-05-28 19:56:06 +08:00
afwerar 02e6b38270 fix(os): make taosd run on win. 2022-05-09 03:22:05 +08:00
shenglian zhou 8b9e94a038 scalar udf memory by itself 2022-05-05 19:03:05 +08:00
shenglian zhou f183c5606c before modify udfd process request and runudf.c 2022-04-27 07:27:58 +08:00
slzhou e9e6b1fa1f sync home office 2022-04-26 18:28:30 +08:00
afwerar fc24521621 fix(os): windows compile 3.0. 2022-04-22 09:54:27 +08:00
Xiaoyu Wang 311b407260
Merge pull request #11678 from taosdata/feature/3.0_wxy
feat: sql command 'create function'
2022-04-20 18:33:23 +08:00
Xiaoyu Wang 6f377189d0 feat: sql command 'create function' 2022-04-20 17:43:02 +08:00
slzhou 7ed7624306 after trying to retrive udf info from mnode 2022-04-15 18:31:57 +08:00
slzhou ed597e6e54 pass compilation before udf call refinement 2022-04-15 11:19:00 +08:00
shenglian zhou 946b565e99 sync home and office 2022-04-14 19:29:41 +08:00
afwerar 2662a3b69d [TD-13254]<fix>: make 3.0 grant. 2022-04-10 19:08:16 +08:00
Ganlin Zhao aaa2d2094a Merge branch '3.0' into 3.0_glzhao_math_func 2022-03-26 10:24:33 +08:00
afwerar 222db126bc [TD-13758]<fix>: redefine memory api. 2022-03-26 00:29:53 +08:00
Ganlin Zhao 303a853c0c [TD-14240]<feature>: add math functions 2022-03-25 20:09:26 +08:00
shenglian zhou abedeb23d6 libuv dependency refactoring 2022-03-25 08:34:46 +08:00
shenglian zhou 14031ca668 add simple test 2022-03-24 17:43:57 +08:00
shenglian zhou 8c12733e19 pass compilation before change log 2022-03-24 14:57:48 +08:00
Shengliang Guan dc30a83f24 monitor 2022-03-02 17:48:39 +08:00
Xiaoyu Wang a0a61fa91d TD-13120 SELECT statement data structure definition 2022-01-19 21:51:23 -05:00
Haojun Liao aa06470943 [td-10564] fix memory leak in unit test and refactor some codes. 2021-10-28 16:16:42 +08:00
Haojun Liao b7917aa43b [td-10564] Add codes for query parsing. 2021-10-21 11:06:52 +08:00