Commit Graph
839 Commits
Author SHA1 Message Date
Christian G. WardenandGitHub cb48887b9f Preserve The Specified Timezone In Parse (#633)
* Preserve The Specified Timezone In Parse

When parsing a string into a Time using the optional timezone
parameter, set the location of the Time to the timezone's location so
that Format uses that timezone.

* Add More Tests for Preserving Timezone

Add test when timezone is used to parse a date-time.

Add test when timezone is irrelevant because it's a date.
2024-04-24 14:08:49 +02:00
gnolizuhandGitHub be7ee98cb8 New usage case: xiaohongshu.com (#631)
add company usecase of xiaohongshu.com

Signed-off-by: gnolizuh <[email protected]>
2024-04-22 12:05:36 +02:00
Anton Medvedev 3ceff1cdb3 Fix printing on conditional/binary nodes
Fixes #613
2024-04-16 23:23:12 +02:00
Anton Medvedev c8f7d22462 Return proper nil from optional chain
Fixes #570
2024-04-16 23:11:01 +02:00
Anton Medvedev 199f26c7e3 Update sortBy docs 2024-04-14 08:56:31 +02:00
Anton Medvedev ba3bae5017 Add more optimizer tests 2024-04-13 23:50:53 +02:00
Anton Medvedev c5dfe3a811 Make count() predicate optional 2024-04-13 23:38:35 +02:00
Anton Medvedev d8d1d9ebf4 Code style 2024-04-13 23:18:59 +02:00
Anton Medvedev 8589d34039 Add sum([]) optimization 2024-04-13 23:16:08 +02:00
Anton Medvedev 27b20607f1 Add sum(map()) optimization 2024-04-13 22:50:11 +02:00
Anton MedvedevandGitHub 772eaba1ca Add predicate to sum() builtin (#592)
* Add predicate to sum() builtin

* go mod tidy
2024-04-13 15:37:02 +02:00
Anton Medvedev 01014b4c50 Merge compare-arrays 2024-04-13 10:11:06 +02:00
DaenneyandAnton Medvedev 1934e4eaee Make WithContext work for methods on env struct (#602)
This makes the WithContext patcher work when passing in a struct for an
env that has methods that take a context.

This is a bit fiddly because we can't quite detect the difference of
function vs. method on a struct, so we have to check both the first and
the second param. Since it's highly unusual to pass the context as
anything other than the first parameter, this should work out just fine
in practice.

Fixes #600.
2024-04-13 10:09:18 +02:00
SergeyandAnton Medvedev 2c460ecc98 Optimize boolean operations between all, any, none functions (#626) 2024-04-13 10:09:16 +02:00
Anton Medvedev 1fab6ed6e0 Revert "Optimize boolean operations between all, any, one, none functions (#555)" (#625)
This reverts commit 8037acf0bb.
2024-04-13 10:08:48 +02:00
needsureandAnton Medvedev 03af7491ad chore: fix some typos in conments (#622)
Signed-off-by: needsure <[email protected]>
2024-04-13 10:08:48 +02:00
Anton Medvedev 858f009587 Update README.md 2024-04-13 10:08:48 +02:00
Richard WoodingandAnton Medvedev 28060656f0 Update README.md (#619)
Add SPAN Digital as an user of expr
2024-04-13 10:08:48 +02:00
zhuliquanandAnton Medvedev 43556eecdd feat: extract code for compiling equal operator (#614) 2024-04-13 10:08:48 +02:00
Anton Medvedev 2ff83e8042 Better map ast printing 2024-04-13 10:08:48 +02:00
SergeyandAnton Medvedev db0054ab6f builtin int unwraps underlying int value (#611) 2024-04-13 10:08:48 +02:00
SergeyandAnton Medvedev 721b908494 expr.Operator passes before expr.Env caused error (#606) 2024-04-13 10:08:46 +02:00
Ganesan KaruppasamyandAnton Medvedev 527f3aacaf Fix -1 not in [] expressions (#590) 2024-04-13 10:08:10 +02:00
Ganesan KaruppasamyandAnton Medvedev 6fcc422765 Enable Support for Arrays in Sum, Mean, and Median Functions (#580) 2024-04-13 10:08:10 +02:00
Anton Medvedev 3dc373ec9a Add spans 2024-04-13 10:08:10 +02:00
SergeyandAnton Medvedev 2be09b2554 Support chzained comparisonc1 < 2 < 3 (#581) 2024-04-13 10:08:10 +02:00
DaenneyandGitHub 13451f69b4 Make WithContext work for methods on env struct (#602)
This makes the WithContext patcher work when passing in a struct for an
env that has methods that take a context.

This is a bit fiddly because we can't quite detect the difference of
function vs. method on a struct, so we have to check both the first and
the second param. Since it's highly unusual to pass the context as
anything other than the first parameter, this should work out just fine
in practice.

Fixes #600.
2024-04-12 22:54:01 +02:00
SergeyandGitHub 2835692a5f Optimize boolean operations between all, any, none functions (#626) 2024-04-12 18:49:41 +02:00
Anton MedvedevandGitHub 3205e4186b Revert "Optimize boolean operations between all, any, one, none functions (#555)" (#625)
This reverts commit 8037acf0bb.
2024-04-10 10:58:17 +02:00
needsureandGitHub c0d4644255 chore: fix some typos in conments (#622)
Signed-off-by: needsure <[email protected]>
2024-04-09 13:13:55 +02:00
Anton MedvedevandGitHub 4b2c15770d Update README.md 2024-04-09 09:47:41 +02:00
Richard WoodingandGitHub dc40f0eef6 Update README.md (#619)
Add SPAN Digital as an user of expr
2024-04-08 09:00:54 +02:00
zhuliquanandGitHub 62163f4450 feat: extract code for compiling equal operator (#614) 2024-03-28 14:37:51 +01:00
Anton Medvedev 9ca56a8aeb Better map ast printing 2024-03-27 09:26:56 +01:00
SergeyandGitHub 3f12ea7559 builtin int unwraps underlying int value (#611) 2024-03-20 20:06:04 +01:00
SergeyandGitHub 377d126756 expr.Operator passes before expr.Env caused error (#606) 2024-03-17 08:51:53 +01:00
bizy db5a6defcb Add bench and tests for runtime.Equal 2024-03-05 01:31:07 +07:00
Ganesan KaruppasamyandGitHub 650a7f5ac1 Fix -1 not in [] expressions (#590) 2024-03-04 14:40:33 +01:00
Ganesan KaruppasamyandGitHub 20d784fe9b Enable Support for Arrays in Sum, Mean, and Median Functions (#580) 2024-03-03 16:44:32 +01:00
Anton MedvedevandGitHub 46d295876f Add spans 2024-02-29 20:51:34 +01:00
SergeyandGitHub ee69dbfa99 Equal bools without reflect.DeepEqual (#585) 2024-02-28 10:39:01 +01:00
bizy 5bb64800db Compare any arrays 2024-02-28 00:30:33 +07:00
SergeyandGitHub 26bfa591a9 Support chzained comparisonc1 < 2 < 3 (#581) 2024-02-27 14:23:49 +01:00
Ganesan KaruppasamyandGitHub 2f8f25a68d Enhanced min and max built-in functions to Support Arrays of Integers and Floats (#576)
* Enhanced min and max built-in functions to Support Arrays of Integers and Floats

* Enhanced min and max built-in functions to Support Arrays of Integers and Floats
2024-02-24 21:12:51 +01:00
Anton Medvedev 14d3c281b2 Remove redundant checks 2024-02-21 00:07:51 +01:00
Anton Medvedev c3a9aa8f44 Fix naming 2024-02-18 09:55:10 +01:00
Anton Medvedev ee9b3142d1 Add quotes to error message 2024-02-18 09:45:39 +01:00
Anton Medvedev b117e690fb Fix operator overloading recursive
Fixes #548
2024-02-18 00:15:39 +01:00
Anton Medvedev 96c6ad6087 Refactor operator override to be purely patcher pkg 2024-02-17 19:56:28 +01:00
Anton Medvedev 6f8353d205 Remove redundant operator override check 2024-02-17 19:20:53 +01:00