Commit Graph

735 Commits

Author SHA1 Message Date
dapan1121 e72cf17985
Merge pull request #27214 from taosdata/fix/3.0/TD-31439
fix:[TD-31439] Reset groupNum and unitNum when malloc failed.
2024-08-14 17:07:34 +08:00
sima e405d934e8 fix:[TD-31443] Reset field nums in SFilterFields when malloc failed. 2024-08-14 16:04:34 +08:00
dapan1121 084592dc34
Merge pull request #27168 from taosdata/feat/TS-4893
feat:[TS-4893] Support MYSQL functions.
2024-08-14 15:10:27 +08:00
sima 9b490d7a76 fix:[TD-31439] Reset groupNum and unitNum when malloc failed. 2024-08-14 14:37:32 +08:00
sima c9b9871477 fix:[TD-31351] avoid double free. 2024-08-14 10:19:30 +08:00
sima a54019211f feat:[TS-4893] Support MYSQL functions.
Add more functions:
 - Numeric Functions: PI(),ROUND(),TRUNC(),EXP(),LN(),SIGN(),DEGREES(),RADIANS().
 - String Functions: CHAR(),ASCII(),POSITION(),TRIM(),REPLACE(),REPEAT().
 - Date and Time Functions: WEEKDAY(),DAYOFWEEK(),WEEK(),WEEKOFYEAR().
 - Aggregate Functions: VAR_POP().
Modify some functions:
 - ROUND(): support round to given decimal places.
 - CHAR_LENGTH(): support calculate multi-byte character's length.
 - TIMEDIFF(): result will be negative when expr1 < expr2.
 - STDDEV(): add alias name STDDEV_POP().
 - SUBSTR(): add alias name SUBSTRING().
             support new syntax SUBSTRING/SUBSTR(expr FROM pos [FOR len]).
2024-08-14 09:19:25 +08:00
sima b26bdd550a fix:[TD-31381] avoid double free. 2024-08-13 11:34:05 +08:00
sima a3637af498 fix:[TD-31374] vectorConvertSingleCol set precision only when type is timestamp. 2024-08-12 18:59:10 +08:00
sima 64874f6e40 fix:[TD-31355] use correct way to handle error. 2024-08-09 16:00:05 +08:00
dapan1121 905d1eb762
Merge pull request #26972 from taosdata/fix/TD-29679/l2cache
Fix/td 29679/l2cache
2024-08-08 16:51:44 +08:00
sima cb4cc327d9 fix:[TD-31326] Return correct error code in _return. 2024-08-08 14:19:17 +08:00
dapan1121 65cfa89f56
Merge pull request #27072 from taosdata/fix/3.0/TD-31313
fix:[TD-31313] fix error handling.
2024-08-08 13:53:07 +08:00
sima ea1e2bc68e fix:[TD-31313] fix error handling. 2024-08-08 10:32:44 +08:00
sima ad523425b7 fix:[TD-31279] free memory when error occurred. 2024-08-08 08:05:20 +08:00
sima c48d377582 fix:[TD-31264] fix wrong result when using concat multi-byte character with nchar. 2024-08-06 16:26:48 +08:00
xsren 3adaebd2a0 return value 2024-08-06 16:20:29 +08:00
sima a81d8261e5 fix:[TD-31113] return 0.0 instead of -0.0 when using round() and ceil() 2024-07-31 14:00:06 +08:00
xsren d0131bb83a fix: not in null 2024-07-30 14:33:47 +08:00
xsren d7aab4c7b6 fix: in null 2024-07-29 19:15:48 +08:00
sima 77f97d2a6d enh:[TD-30996] Handling return value 2024-07-28 18:29:57 +08:00
wangjiaming0909 1994c3339b nodes add ret check 2024-07-26 17:55:48 +08:00
sima 6255a7ba10 enh:[TD-31063] use properer errcode. 2024-07-23 15:03:15 +08:00
sima 9130ac6138 enh:[TD-31063] Handling return value of taoshash and taosarray 2024-07-23 15:02:54 +08:00
sima e1bcd84426 enh:[TD-30998] Handling memory release when error occurred. 2024-07-19 11:28:21 +08:00
sima e7c58ff8c8 enh:[TD-30998] Handling return value in scalarTest.c 2024-07-19 11:28:21 +08:00
sima 71e57b1dfc enh:[TD-30998] Handling return value in filterTest.c 2024-07-19 11:28:21 +08:00
sima a1fb874c22 enh:[TD-30998] Handling return value in sclvector.c 2024-07-19 11:28:21 +08:00
sima e0ffc8edcb enh:[TD-30998] Handling return value in sclfunc.c 2024-07-19 11:28:21 +08:00
sima 2893a93303 enh:[TD-30998] Handling return value in scalar.c 2024-07-19 11:28:21 +08:00
sima 434fd97615 enh:[TD-30998] Handling return value in filter.c 2024-07-19 11:28:21 +08:00
factosea eed684e072 fix: match check 2024-07-12 14:16:55 +08:00
factosea 2604a17fef fix: invalid operation 2024-07-12 12:04:23 +08:00
factosea 57f826608a checkout regex pattern at client 2024-07-12 11:48:48 +08:00
factosea cfda747613 fix: match cache release 2024-07-11 21:00:08 +08:00
factosea 41b8693430 use regex cache 2024-07-10 19:46:09 +08:00
sima 96e3222726 fix:[TD-30730] fix mergejoin operator's timetruncate caculation on timezone. 2024-06-27 08:42:59 +08:00
sima 4601583361 fix:[TD-30730] Modify precision rules for input parameters of function timetruncate and add test. 2024-06-27 08:42:59 +08:00
sima 5685346d78 fix:[TD-30730] Modify precision rules for input parameters of function to_iso8601 and add test. 2024-06-27 08:42:59 +08:00
dapan1121 784fda8191 fix: cast long binary crash issue 2024-06-20 13:54:02 +08:00
dapan1121 e34a8b48df
Merge pull request #26008 from taosdata/fix/TS-4833/dataloaded
partition interval and limimt, dataload error
2024-06-17 08:32:19 +08:00
dapan1121 ddf15fa55c Merge remote-tracking branch 'origin/3.0' into enh/stmtPerf.3 2024-06-05 17:13:48 +08:00
dapan1121 da8616d98a fix: add stbInterlace mode test cases 2024-06-05 17:12:15 +08:00
dapan1121 6f696a3933 fix: insert into select constant issue 2024-06-04 16:27:51 +08:00
factosea c42e627a41 test 2024-06-04 11:39:47 +08:00
wangjiaming0909 f6200dd923 support long ctb names 2024-04-16 14:25:34 +08:00
dapan1121 319ab5f2c2 enh: support hash join 2024-04-12 15:44:23 +08:00
dapan1121 337f39191e fix: eliminate project issue 2024-04-03 18:35:50 +08:00
dapan1121 6e674bc1de Merge remote-tracking branch 'origin/3.0' into feat/TD-27337 2024-03-15 18:11:37 +08:00
Haojun Liao 3a0df8be8d fix(query): handle the calculation of logic expression with different result rows, when constant expression exists. 2024-03-13 23:13:24 +08:00
dapan1121 85cca872a5 enh: support timetruncate function 2024-02-29 17:52:53 +08:00
Haojun Liao cb2ea4a721 fix(stream): take ver snapshot for all vgroups before launching stream with fill-history option opened. 2024-02-01 11:37:57 +08:00
Alex Duan 27aa90d6b0 feat: sclfuns.c finished 2024-01-25 09:12:02 +08:00
facetosea f010e18ff0 fix: LEASTSQUARES func result stack overflow 2024-01-17 18:28:00 +08:00
xinsheng Ren 737abbebb7
Revert "fix: LEASTSQUARES func result overflow" 2024-01-17 10:09:56 +08:00
factosea fdb847fd36 fix: LEASTSQUARES func result overflow 2024-01-16 15:34:05 +08:00
wangjiaming0909 153221e1d6 fix: cache scan heap overflow and forbid DDD for to_char in windows 2023-12-21 19:46:33 +08:00
wangmm0220 b99b9986b8 fix:heap overflow if print json value node 2023-12-11 19:46:51 +08:00
root a3737fe54d Fix bug [4258]: add process ignore/no timezone for timetruncate unit is 1w 2023-11-23 18:08:58 +08:00
facetosea 45d7e9f02b fix: goto error 2023-11-22 10:48:08 +08:00
Bob Liu ba8a410d6d fix toISO8601Function 2023-11-12 19:15:41 +08:00
wangjiaming0909 ea5adf5511 report not supported error when DDD but no DD specified 2023-11-09 20:20:00 +08:00
dapan1121 92240d7f95
Merge pull request #23505 from taosdata/fix/3.0/TS-4052
fix: nano seconds database error
2023-11-03 10:27:40 +08:00
wangjiaming0909 b71a013b8d fix: nano seconds database error 2023-11-02 09:36:46 +08:00
dapan1121 91df56fcf0 Merge remote-tracking branch 'origin/3.0' into feat/TD-25204 2023-10-31 18:44:54 +08:00
wangjiaming0909 70850697a4 feat: support to_timestamp/to_char fix comments 2023-10-27 09:54:16 +08:00
dapan1121 6dcc555bbc fix: view privilege issue 2023-10-25 10:47:01 +08:00
wangjiaming0909 f299a28109 feat: support to_timestamp/to_char 2023-10-23 19:36:03 +08:00
shenglian zhou fc824a3bb9 fix: timestamp add return float when get time range 2023-09-27 16:39:49 +08:00
wangjiaming0909 952d6e1492 fix: coverity issues 2023-09-08 10:26:37 +08:00
dapan1121 cc17848b78 fix: merge 3.0 to main 2023-09-01 13:24:47 +08:00
shenglian zhou 322e8c6697 fix: use col cell size instead of total col data size 2023-08-28 13:43:37 +08:00
shenglian zhou 09463cb43e enhance: fix buffer size overflow 2023-08-28 11:28:49 +08:00
Shungang Li 8f91da24e4 fix: type convert failure returns errcode
TSDB_CODE_SCALAR_CONVERT_ERROR:
"Cannot convert to specific type"
2023-07-11 10:20:50 +08:00
Ganlin Zhao cde9eac954 enh: add procedures on server for udf/udaf in nested queries where outer query is
constant table
2023-07-10 11:34:32 +08:00
dapan1121 3519e9170e Merge remote-tracking branch 'origin/main' into 3.0 2023-06-29 11:13:45 +08:00
Shungang Li 308ba7a02e fix: type geometry predicates support
support "=, <>, is null, is not null, in, not in"
2023-06-29 09:44:51 +08:00
Ganlin Zhao 5bb7d26501 fix coverity scan issue 2023-06-28 11:12:10 +08:00
dapan1121 e2d45438cb
Merge pull request #21405 from taosdata/szhou/scl-flt
enhance: scalar filter improvement
2023-05-28 18:49:39 +08:00
slzhou b83bf9163e fix: restore scalar mode computation and add filterScalarMode config variable and add test case 2023-05-26 14:46:32 +08:00
slzhou 81c796953e fix: address sanitizer error 2023-05-26 10:55:52 +08:00
slzhou cbbd09b85c fix: for logical and condition, each element shall be collectable operator 2023-05-25 22:37:49 +08:00
slzhou 469b2b573c fix: fix error during emptyTsRange.sim 2023-05-25 21:49:28 +08:00
slzhou 61b0635293 fix: get time range using new scalar mode range 2023-05-25 16:27:48 +08:00
slzhou de1848cb08 enhance: use scalar mode to run ci test 2023-05-25 14:51:53 +08:00
slzhou 768372fc7b fix: fix compilation warning 2023-05-24 16:45:06 +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
slzhou 5b1e0be756 enhance: add log 2023-05-24 13:41:21 +08:00
slzhou 383c828c85 fix: before review 2023-05-24 11:18:44 +08:00
slzhou 2e4c14c18c fix: fix bugs 2023-05-23 21:30:41 +08:00
slzhou 22616d235a fix: fix minior bugs 2023-05-23 16:36:27 +08:00
slzhou 857cf3d269 fix: fix bugs 2023-05-23 14:29:33 +08:00
slzhou 99620d434d fix: fix bugs 2023-05-23 14:11:52 +08:00
shenglian zhou c9140e547e fix: fix bugs of wrongly use sfltscloperator 2023-05-23 14:08:20 +08:00
slzhou 77a1de444c fix: where c7 means c7 is true, the right child is null 2023-05-23 10:47:58 +08:00
slzhou 24ae8d7ecb fix: fix ci memory leak error 2023-05-23 09:49:42 +08:00
shenglian zhou 43ac6fb1fd fix: all null from block sma 2023-05-23 08:43:31 +08:00
shenglian zhou 6456d5dccf enhance: code finish 2023-05-22 11:41:19 +08:00
shenglian zhou 1f6d894dfd fix: save work 2023-05-19 17:06:03 +08:00
shenglian zhou 3e92ec7a8a fix: save work 2023-05-19 14:09:37 +08:00
shenglian zhou 09837b7639 fix: save work 2023-05-18 19:00:10 +08:00