milvus/.gitignore
Tianx 2c0c5ef41e
feat: timestamptz expression & index & timezone (#44080)
issue: https://github.com/milvus-io/milvus/issues/27467

>My plan is as follows.
>- [x] M1 Create collection with timestamptz field
>- [x] M2 Insert timestamptz field data
>- [x] M3 Retrieve timestamptz field data
>- [x] M4 Implement handoff
>- [x] M5 Implement compare operator
>- [x] M6 Implement extract operator
 >- [x] M8 Support database/collection level default timezone
>- [x] M7 Support STL-SORT index for datatype timestamptz

---

The third PR of issue: https://github.com/milvus-io/milvus/issues/27467,
which completes M5, M6, M7, M8 described above.

## M8 Default Timezone

We will be able to use alter_collection() and alter_database() in a
future Python SDK release to modify the default timezone at the
collection or database level.

For insert requests, the timezone will be resolved using the following
order of precedence: String Literal-> Collection Default -> Database
Default.
For retrieval requests, the timezone will be resolved in this order:
Query Parameters -> Collection Default -> Database Default.
In both cases, the final fallback timezone is UTC.


## M5: Comparison Operators

We can now use the following expression format to filter on the
timestamptz field:

- `timestamptz_field [+/- INTERVAL 'interval_string'] {comparison_op}
ISO 'iso_string' `

- The interval_string follows the ISO 8601 duration format, for example:
P1Y2M3DT1H2M3S.

- The iso_string follows the ISO 8601 timestamp format, for example:
2025-01-03T00:00:00+08:00.

- Example expressions: "tsz + INTERVAL 'P0D' != ISO
'2025-01-03T00:00:00+08:00'" or "tsz != ISO
'2025-01-03T00:00:00+08:00'".

## M6: Extract

We will be able to extract sepecific time filed by kwargs in a future
Python SDK release.
The key is `time_fields`, and value should be one or more of "year,
month, day, hour, minute, second, microsecond", seperated by comma or
space. Then the result of each record would be an array of int64.



## M7: Indexing Support

Expressions without interval arithmetic can be accelerated using an
STL-SORT index. However, expressions that include interval arithmetic
cannot be indexed. This is because the result of an interval calculation
depends on the specific timestamp value. For example, adding one month
to a date in February results in a different number of added days than
adding one month to a date in March.

--- 

After this PR, the input / output type of timestamptz would be iso
string. Timestampz would be stored as timestamptz data, which is int64_t
finally.

> for more information, see https://en.wikipedia.org/wiki/ISO_8601

---------

Signed-off-by: xtx <xtianx@smail.nju.edu.cn>
2025-09-23 10:24:12 +08:00

120 lines
1.7 KiB
Plaintext

# CLion generated files
# This can ignore
# cmake-build-debug/
# proxy/cmake-build-debug/
# a/b/c/cmake-build-debug/
**/cmake-build-debug/*
**/cmake-build-debug-coverage/*
**/cmake-build-release/*
**/cmake_build_release/*
**/cmake_build/*
**/CMakeFiles/*
**/.cmake/*
CMakeCache.txt
.cache
coverage_report/
internal/core/output/*
internal/core/build/*
**/.idea/*
internal/msgstream/pulsarms/client-cpp/build/
internal/msgstream/pulsarms/client-cpp/build/*
tests/python_client/default.etcd/
# vscode generated files
.vscode
docker-compose-devcontainer.yml
docker-compose-devcontainer.yml.tmp
.cursor
*.code-workspace
# Docker generated cache file
.docker/
.docker-gpu/
**/_artifacts/**
# proxy
proxy/milvus
proxy/thirdparty/grpc-src
proxy/thirdparty/grpc-build
proxy/milvus/*
proxy/suvlim/
proxy/suvlim/*
proxy-go/proxy-go
# Compiled source
bin/
lib/
*.a
*.so
*.so.*
*.o
*.lo
*.tar.gz
*.log
.coverage
*.pyc
*.log
# macOS generated files & other irrelevant files
.DS_Store
*.sw[po]
cwrapper_build
cwrapper_rocksdb_build/
**/.clangd/*
**/compile_commands.json
**/.lint
typescript
**/.pytest_cache/
.root
gtags.conf
# Delve generated file
**/__debug_bin
# codecov-go generated files
*coverage.txt
profile.out
*coverage.html
cover.out
# codecov-cpp generated files
lcov_*.info
cpp_coverage/
# virtualenv
venv/
.venv/
# gopls generated
go.work
go.work.sum
# docker compose volumes
deployments/docker/*/volumes
deployments/docker/gpu/*/volumes
# rocksdb
cwrapper_rocksdb_build/
# local file data
**/data/*
!**/tantivy-binding/src/analyzer/data/*
internal/proto/**/*.pb.go
pkg/streaming/**/*.pb.go
internal/core/src/pb/*.pb.h
internal/core/src/pb/*.pb.cc
**/legacypb/*.pb.go
pkg/streaming/proto/**/*.pb.go
#AI rules
WARP.md
# Antlr
.antlr