* fix(mysql): cap timestamp output at microsecond precision
Truncate MySQL text timestamp results to microseconds while preserving the existing second and millisecond formatting. Keep stored nanoseconds and explicit integer/string representations unchanged.
Fixes#9828
Signed-off-by: luofucong <luofc@foxmail.com>
* chore: ignore local output directory
Signed-off-by: luofucong <luofc@foxmail.com>
---------
Signed-off-by: luofucong <luofc@foxmail.com>
* chore(deps): replace cargo-udeps with cargo-shear for unused dependency checks
cargo-udeps requires a nightly toolchain and its pinned version (0.1.61)
no longer detects unused dependencies against current cargo internals —
unused deps have landed on main undetected (e.g. humantime in
common-frontend since #6689). cargo-shear is a standalone static analyzer
that runs on any toolchain.
- Swap 'make check-udeps' / 'make fix-udeps' recipes to 'cargo shear' /
'cargo shear --fix' and retire scripts/fix-udeps.py
- CI: install cargo-shear in the check-udeps job; drop the build cache
and protoc steps (cargo-shear never compiles)
- Remove ~150 unused dependency declarations found by cargo-shear, move
misplaced deps to the correct sections, drop orphaned
[workspace.dependencies] entries (arrow-cast, rustc-hash)
- Add [package.metadata.cargo-shear] ignored entries with explanations
for dependencies that are structurally required despite no textual
reference: sqlparser (required by sqlparser_derive expansions in
datatypes, common-query), common-error (required by common-macro's
stack_trace_debug expansions in session, tests-fuzz), k8s-openapi
(feature-pinning for the transitive kube dependency in tests-fuzz),
tikv-jemalloc-sys (link-only, enables jemalloc profiling features in
common-mem-prof), protobuf (required by build.rs-generated bindings in
log-store)
- Drop the obsolete [package.metadata.cargo-udeps.ignore] sections
Part of #9289
Signed-off-by: Ning Sun <sunning@greptime.com>
* fix(meta): populate physical metric table column ids (#9286)
* fix(meta): populate physical metric table column ids
Signed-off-by: dhruvxvaishnav <dhruvvaishnav687@gmail.com>
* test(meta): verify physical metric column ids
Signed-off-by: dhruvxvaishnav <dhruvvaishnav687@gmail.com>
---------
Signed-off-by: dhruvxvaishnav <dhruvvaishnav687@gmail.com>
* fix(postgres): return empty responses for comment-only SQL (#9295)
fix(postgres): handle parsed empty queries in both protocols
Signed-off-by: houyuwushang <180804215+houyuwushang@users.noreply.github.com>
* ci: create docs follow-up issue on PR merge instead of on label (#9237)
* ci: create docs follow-up issue on PR merge instead of on label
The docbot workflow previously created a docs-repo issue as soon as the
'docs-required' condition was detected (PR opened/edited with the docs
checkbox ticked), even if the PR was never merged.
Now the workflow also triggers on PR 'closed':
- opened/edited: only manage the docs-required/docs-not-required labels
- closed: create the docs issue only when the PR was actually merged and
carries the docs-required label
This also lets maintainers control issue creation by manually adding or
removing the docs-required label before merging.
Signed-off-by: Ning Sun <sunning@greptime.com>
* fix: address review comments on docs issue creation timing
- Only touch docs labels when the docs checkbox state actually changed
in an edit. Previously, editing any other part of the PR body while
the checkbox stayed checked removed the docs-required label, silently
dropping the docs follow-up now that issue creation happens at merge.
Unchanged checkbox now leaves labels untouched, which also preserves
manual label overrides.
- Do not trust the closed event's stale label snapshot at merge time:
re-read the live PR via the API and create the docs issue if the
docs-required label is present OR the checkbox is ticked in the
current body.
- Make the workflow concurrency group action-aware so a merge run does
not cancel an in-flight label update from an edit run.
Signed-off-by: Ning Sun <sunning@greptime.com>
* fix: make docs-required label the single source of truth at merge
The label-OR-checkbox merge condition could not distinguish an
intentional opt-out from an unfinished label update: removing
docs-required while the checkbox stayed checked still produced an
issue, and unchecking the box could still produce one if the merge
read the stale label before the edit run removed it.
At merge time, wait for any pending docbot runs on the PR head SHA to
finish their label updates (bounded to 5 minutes), then decide solely
by the live docs-required label. Adds actions: read permission for
listing workflow runs.
Signed-off-by: Ning Sun <sunning@greptime.com>
---------
Signed-off-by: Ning Sun <sunning@greptime.com>
* perf(promql): push label filters into grouped join inputs (#9280)
* perf(promql): propagate matching filters through grouped joins
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
* perf(promql): check matcher safety on the receiving operand
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
* refactor(promql): spell out the shapes a filter may cross
`preserves_filter` ended in `_ => true`, which was only sound because
`selector_matchers` independently rejects label rewriting, `count_values`,
subqueries and non-rollup calls on the same operand. Loosening the latter
alone would have silently pushed a matcher below a label rewrite. List the
shapes that carry a scan filter instead and default to `false`.
Cite #9207 for the result labels the grouped cases record: the join
projects the right operand's tag set, so `zone` is missing wherever the
right side aggregates it away.
No behavior change.
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
* test(promql): assert the new pushdowns reach the scan
The grouped-join unit tests feed tag columns by hand and the SQLness case
only checks results, which are identical whether or not the rewrite fires.
Nothing would have failed if scalar arithmetic, ranking or grouped
matching stopped propagating. Assert through the planner that the matcher
reaches both scans, with a global topk one-side as the counter-example.
Also state that the duplicate-one-side cases record a cross product
Prometheus rejects (#9209), so the baseline is not read as intended
semantics.
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
---------
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
* fix(ci): build tests-integration lib with meta-srv/mock (#9299)
* fix(ci): build tests-integration lib with meta-srv/mock
tests-integration's lib code (src/cluster.rs) uses meta_srv::mocks, but
the dependency carrying the mock feature sits in [dev-dependencies].
Builds that only touch the lib, such as the apidoc job's cargo doc
--workspace, resolve meta-srv without mock and fail with E0432.
--all-targets builds unify dev-dependency features, which is why check,
clippy and nextest stayed green.
Move the mock-enabled meta-srv entry back to [dependencies]. The other
testing features moved out in #9072 are not needed by the lib and stay
in [dev-dependencies].
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
* test(repartition): split per-case repartition tests
test_repartition_metric ran four format/primary-key-encoding cases in a
single test function, and test_repartition_mito ran two format cases.
Each case builds its own 3-datanode cluster and runs a full repartition
plus GC cycle, so on S3 the metric test took 165-178s against the 180s
nextest terminate-after. Merge queue runs failed on it at random.
Split each case into its own test. Cases were already independent, so
they now run in parallel and each stays far inside the timeout, and a
failure points at one encoding instead of four.
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
---------
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
* feat(json2): support altering JSON2 settings (#9029)
* feat(sql): support alter syntax for JSON2 columns
Signed-off-by: fys <fengys1996@gmail.com>
* fix(json2): preserve rows on type hint mismatch during compaction
* refactor(json2): simplify alter settings handling
* fix(json2): preserve coerced values during compaction
* chore: remove unnecessary clone
* chor: reduce memory allocations
* fix: cargo clippy
* chore: update greptime-proto to main branch
* refactor(datatypes): unify string handling with other JSON type hints
* fix: cr
---------
Signed-off-by: fys <fengys1996@gmail.com>
* fix: keep compaction pruning, metadata, and index work on compact runtime (#9304)
* fix: run compaction pruner tasks on compact runtime
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com>
* fix: keep compaction metadata and index work on compact runtime
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com>
---------
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com>
* feat: add AI matching, classification, and scoring functions (#9300)
* feat: return matching scores from jev
Replace the experimental three-argument Boolean function with jev(text, prompt) returning a Float64 probability in [0, 1]. Move threshold comparisons into SQL and update tests and migration examples.
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com>
* feat: add Jev choice and score functions
Share asynchronous execution across Noul, Choice, and Score. Validate JSON criteria before requests and return typed scalar answers. Add SQL and HTTP mock coverage with usage examples.
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com>
* refactor: use generic AI SQL function names
Expose ai_match, ai_choose, and ai_score and move their implementation, tests, and usage guide under generic AI names. Document the current unreleased interface without migration history.
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com>
* fix: share constant AI criteria within each batch
Borrow scalar string arguments and lazily parse constant criteria once per batch. Share the parsed allocation across requests while preserving NULL propagation and batch validation before HTTP calls.
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com>
* feat: preserve AI score uncertainty in JSONB results
Return score, confidence, and probabilities in criteria-level order from one evaluation. Validate the distribution and preserve provider precision. Add JSON extraction, uncertainty, and single-request regressions, and document confidence-aware ranking.
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com>
* docs: explain reuse of volatile AI evaluations
Document repeated SELECT and WHERE evaluation costs as N + M requests, and show subquery aliases for reusing scalar or structured AI results without additional model calls.
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com>
---------
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com>
* feat: share logical table batching with OTLP metrics (#9288)
* feat: share logical table batching with OTLP metrics
Signed-off-by: WenyXu <wenymedia@gmail.com>
* fix: unify pending rows batch acknowledgement policy
Signed-off-by: WenyXu <wenymedia@gmail.com>
* fix: align logical batcher example configuration expectations
Signed-off-by: WenyXu <wenymedia@gmail.com>
* fix: align batcher worker channel defaults to 65536
Signed-off-by: WenyXu <wenymedia@gmail.com>
---------
Signed-off-by: WenyXu <wenymedia@gmail.com>
* perf(mito2): lazily decode dense primary key columns (#9226)
* perf(mito2): lazily decode dense primary key columns
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com>
* perf(mito2): bypass lazy decoding for full primary keys
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com>
* fix(mito-codec): preserve prefix decoding errors
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com>
* refactor(mito-codec): align encoded length helper naming
Rename encoded_length to encoded_len and update all callers to match the other length helpers in the module.
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com>
* refactor(mito2): clarify conditional dense key decoding
Rename decode_dense_pk to ensure_dense_pk_decoded so callers can see that existing decoded values are preserved and only missing caches are populated.
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com>
* refactor(mito-codec): share string framing in row converter
Move encoded_string_len to the parent module so Dense and Sparse use the same framing helper without depending on each other. Preserve its implementation and visibility.
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com>
---------
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com>
* chore: sync lock
* fix: shear and check issues
---------
Signed-off-by: Ning Sun <sunning@greptime.com>
Signed-off-by: dhruvxvaishnav <dhruvvaishnav687@gmail.com>
Signed-off-by: houyuwushang <180804215+houyuwushang@users.noreply.github.com>
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
Signed-off-by: fys <fengys1996@gmail.com>
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com>
Signed-off-by: WenyXu <wenymedia@gmail.com>
Co-authored-by: Dhruv Vaishnav <dhruvvaishnav687@gmail.com>
Co-authored-by: houyuwushang <180804215+houyuwushang@users.noreply.github.com>
Co-authored-by: dennis zhuang <killme2008@gmail.com>
Co-authored-by: fys <40801205+fengys1996@users.noreply.github.com>
Co-authored-by: Lei, HUANG <6406592+v0y4g3r@users.noreply.github.com>
Co-authored-by: Weny Xu <wenymedia@gmail.com>
docs: add project-level AGENTS.md as the shared agent/contributor guide
Promote the agent guidance that was previously a personal, gitignored root file
into a committed, contributor-facing AGENTS.md, and tie together the existing
.agents/ resources (architecture invariants, generated-files list, skills) and
the per-crate AGENTS.md guides under one auto-discoverable root entry point.
- Add root AGENTS.md: core commands, repo map, must-read rules, high-signal
entry points, and pre-PR checks. Worded for any coding agent, not just one.
- CLAUDE.md becomes a symlink to AGENTS.md for Claude Code compatibility.
- .gitignore: stop ignoring root AGENTS.md/CLAUDE.md; ignore /.local/ instead,
which is where personal/local agent config now lives.
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
* docs(agents): add per-crate guides, architecture invariants, and generated-files list
Add agent/contributor navigation docs modeled on the AGENTS.md convention:
- Per-crate AGENTS.md for hot crates (mito2, metric-engine, flow, frontend,
meta-srv): module map, read/write paths, change-coupling points, test
commands, and gotchas.
- .agents/architecture-invariants.md: repo-wide rules that clippy and the
style guide do not cover (format compatibility, crate layering, async
runtimes, error handling, experimental gating, the DataFusion fork).
- .agents/generated-files.md: tool-generated artifacts that must not be
hand-edited (sqlness .result, config.md, dashboards, build.rs output, proto).
- Anchor the .gitignore CLAUDE.md/AGENTS.md rules to the repo root so per-crate
AGENTS.md files are tracked while root-level personal config stays ignored.
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
* chore: update crate AGENTS.md and fix config.md path
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
* docs(agents): fix DataFusion patch layout and SQL query lifecycle order
Address review feedback on #8346:
- architecture-invariants: the DataFusion sub-crates pin an exact crates.io
version in [workspace.dependencies] and are redirected to the fork rev in
[patch.crates-io]; the two sections hold different forms, not the same rev.
- frontend: the SQL query lifecycle runs the pre_parsing/post_parsing
interceptors around parsing, before the per-statement permission check.
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
---------
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
* feat: supports null reponse format for http API
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
* fix: license header and assertion
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
* chore: in seconds
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
---------
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
* feat: add create table fuzz test
* chore: add ci cfg for fuzz tests
* refactor: remove redundant nightly config
* chore: run fuzz test in debug mode
* chore: use ubuntu-latest
* fix: close connection
* chore: add cache in fuzz test ci
* chore: apply suggestion from CR
* chore: apply suggestion from CR
* chore: refactor the fuzz test action
* feat: support to copy from orc format
* test: add copy from orc test
* chore: add license header
* refactor: remove unimplemented macro
* chore: apply suggestions from CR
* chore: bump orc-rust to 0.2.3
* feat: adds s3 object storage configuration
* feat: adds s3 integration test
* chore: use map
* fix: forgot license header
* fix: checking if bucket is empty in test_on
* chore: address CR issues
* refactor: run s3 test with dotenv
* chore: randomize grpc port for test
* fix: README in tests-integration
* chore: remove redundant comments
* feat: improve try_into_vector function
* Impl python mod and PyVector to execute script
* add AsSeq(BUT not IMPL)
* add&test pythonic_index, add into_py_obj(UNTEST)
* add into_datatypes_value(UNTEST)
* inplace setitem_by_index unsupport
* still struggle with testing AsSeq
* actually pyimpl AsSeq&AsMap
* add slice for PyVector
* improve visualibility for testing
* adjust for clippy
* add assert for test_execute_script
* add type anno in test
* feat: basic support for PyVector's operator with scalar (#64)
* feat: memory size of vector (#53)
* feat: improve try_into_vector function
* feat: impl memory_size function for vectors
* fix: forgot memory_size assertion in null vector test
* feat: use LargeUtf8 instead of utf8 for string, and rename LargeBianryArray to BinaryArray
* feat: memory_size only calculates heap size
* feat: impl bytes_allocated for memtable (#55)
* add init and constr
* rename type cast and add test
* fix bug in pyobj_to_val
* add default cast when no type specifed
* add basic add/sub/mul for array and scalar(value)
* cargo clippy
* comment out some println
* stricter clippy
* style: cargo fmt
* fix: string&bool support in val2pyobj & back
* style: remove println in test
* style: rm println in test mod in python.rs
* refactor: use wrap_index instead of pythonic_index
* refactor: right op in scalar_arith_op
* fix: stronger type& better test
* style: remove println
* fix: scalar sign/unsigned cast
* feat: improve try_into_vector function
* Impl python mod and PyVector to execute script
* add AsSeq(BUT not IMPL)
* add&test pythonic_index, add into_py_obj(UNTEST)
* add into_datatypes_value(UNTEST)
* inplace setitem_by_index unsupport
* still struggle with testing AsSeq
* actually pyimpl AsSeq&AsMap
* add slice for PyVector
* improve visualibility for testing
* adjust for clippy
* add assert for test_execute_script
* add type anno in test
* add init and constr
* rename type cast and add test
* fix bug in pyobj_to_val
* add default cast when no type specifed
* add basic add/sub/mul for array and scalar(value)
* cargo clippy
* comment out some println
* stricter clippy
* style: cargo fmt
* fix: string&bool support in val2pyobj & back
* style: remove println in test
* style: rm println in test mod in python.rs
* refactor: use wrap_index instead of pythonic_index
* refactor: right op in scalar_arith_op
* fix: stronger type& better test
* style: remove println
* fix: scalar sign/unsigned cast
* style: remove instead of comment out
* style: remove more comment out
* feat: support scalar div vector
* style: cargo fmt
* style: typo
* refactor: rename to correct var name
* refactor: directly use arrow2::array
* refactor: mv rsub&rdiv's op into a function
* test: add python expr test
* test: add test for PyList
* refactor: tweak order of arithmetics in rtruediv
* style: remove some `use`
* refactor: move `is_instance` to mod
* refactor: move fn to mod& move `use` to head
* style: cargo fmt
* fix: correct signed/unsigned cast
* refactor: wrap err msg in another fn
* style: cargo fmt
* style: remove ok_or_else for readability
* feat: add coprocessor fn(not yet impl)
* refactor: change back to wrapped_at
* fix: update Cargo.lock
* fix: update rustc version
* Update Rust Toolchain to nightly-2022-07-14
* feat: derive Eq when possible
* style: use `from` to avoid `needless_borrow` lint
Co-authored-by: dennis zhuang <killme2008@gmail.com>
* feat: python coprocessor with type annotation (#96)
* feat: add coprocessor fn
Signed-off-by: discord9 <zglzy29yzdk@gmail.com>
* feat: cast args into PyVector
* feat: uncomplete coprocessor
* feat: erase decorator in python ast
* feat: strip decorator in ast
* fix: change parse to `Interactive`
* style: format Cargo.toml
* feat: make coprocessor actually work
* feat: move coprocessor fn out of test mod
* feat: add error handling
* style: add some comment
* feat: rm type annotation
* feat: add type annotation support
* style: move compile method to vm closure
* feat: annotation for nullable
* feat: type coercion cast in annotation
* feat: actually cast(NOT TESTED)
* fix: allow single into(type)
* refactor: extract parse_type from parser
* style: cargo fmt
* feat: change to Expr to preserve location info
* feat: add CoprParse to deal parse check error
* style: add type anno doc for coprocessor
* test: add some test
* feat: add underscore as any type in annotation
* test: add parse& runtime testcases
* style: rm dbg! remnant
* style: cargo fmt
* feat: add more error prompt info
* style: cargo fmt
* style: add doc tests' missing `use`
* fix: doc test for coprocessor
* style: cargo fmt
* fix: add missing `use` for `cargo test --doc`
* refactor: according to reviews
* refactor: more tweaks according to reviews
* refactor: merge match arm
* refactor: move into different files(UNCOMPLELTE)
* refactor: split parse_copr into more function
* refactor: split `exec_coprocessor` to more fn
* style: cargo fmt
* feat: print Py Exceptions in String
* feat: error handling conform standards
* test: fix test_coprocessor
* feat: remove `into` in python
* test: remove all `into` in python test
* style: update comment
* refactor: move strip compile fn to impl Copr
* refactor: move `gen_schema` to impl copr
* refactor: move `check_cast_type` to impl copr
* refactor: if let to match
* style: cargo fmt
* refactor: better parse of keyword arg list
* style: cargo fmt
* refactor: some error handling(UNCOMPLETE)
* refactor: error handling to general Error type
* refactor: rm some Vec::new()
* test: modify all tests to ok
* style: reorder item
* refactor: fetch using iter
* style: cargo fmt
* style: fmt macro by hand
* refactor: rename InnerError to Error
* test: use ron to write test
* test: add test for exec_copr
* refactor: add parse_bin_op
* feat: add check_anno
* refactor: add some checker function
* refactor: exec_copr into smaller func
* style: add some comment
* refactor: add check for bin_op
* refactor: rm useless Result
* style: add pretty print for error with location
* feat: more info for pretty print
* refactor: mv pretty print to error.rs
* refactor: rm execute_script
* feat: add pretty print
* feat: add constant column support
* test: add test for constant column
* feat: add pretty print exec fn
* style: cargo fmt
* feat: add macro to chain call `.fail()`
* style: update doc for constant columns
* style: add lint to allow print in test fn
* style: cargo fmt
* docs: update some comment
* fix: ignore doctest for now
* refactor: check_bin_op
* refactor: parse_in_op, check ret anno fn
* refactor: rm check_decorator
* doc: loc add newline explain
* style: cargo fmt
* refactor: use Helper::try_into_vec in try_into_vec
* style: cargo fmt
* test: add ret anno test
* style: cargo fmt
* test: add name for .ron tests for better debug
* test: print emoji in test
* style: rm some comment out line
* style: rename `into` to `try_into` fn
* style: cargo fmt
* refactor: rm unuse serialize derive
* fix: pretty print out of bound fix
* fix: rm some space in pretty print
* style: cargo fmt
* test: not even a python fn def
* style: cargo fmt
* fix: pretty print off by one space
* fix: allow `eprint` in clippy lint
* fix: compile error after rebase develop
* feat: port 35 functions from DataFusion to Python Coprocessor (#137)
* refactor: `cargo clippy`
* feat: create a module
* style: cargo fmt
* feat: bind `pow()` function(UNTEST)
* test: add test for udf mod
* style: allow part eq not eq for gen code
* style: allow print in test lint
* feat: use PyObjectRef to handle more types
* feat: add cargo feature for udf modules
* style: rename feature to udf-builtins
* refactor: move away from mod.rs
* feat: add all_to_f64 cast fn
* feat: add bind_math_fn macro
* feat: add all simple math UDF
* feat: add `random(len)` math fn
* feat: port `avg()` from datafusion
* refactor: add `eval_aggr_fn`
* feat: add bind_aggr_fn macro
* doc: add comment for args of macro
* feat: add all UDAF from datafusion
* refactor: extract test to separate file
* style: cargo fmt
* test: add incomplete test
* test: add .ron test fn
* feat: support scalar::list
* doc: add comments
* style: rename VagueFloat/Int to LenFloat/IntVec
* test: for all fn(expect approx_median)
* test: better print
* doc: add comment for FloatWithError
* refactor: move test.rs out of builtins/
* style: cargo fmt
* doc: add comment for .ron file
* doc: update some comments
* test: EPS=1e-12 for float eq
* test: use f64::EPSILON instead
* test: change to 2*EPS
* test: cache interpreter for fast testing
* doc: remove a TODO which is done
* test: refacto to_py_obj fn
* fix: pow fn
* doc: add a TODO for type_.rs
* test: use new_int/float in test serde
* test: for str case
* style: cargo fmt
* feat: cast PyList to ScalarValue::List
* test: cast scalar to py obj and back
* feat: cast to PyList
* test: cast from PyList
* test: nested PyVector unsupported
* doc: remove unrunable doctest
* test: replace PartialEq with impl just_as_expect
* doc: add name for discord9's TODO
* refactor: cahnge to vm.ctx.new_** instead
* doc: complete a TODO
* refactor: is_instance and other minor problem
* refactor: remove type_::is_instance
* style: cargo fmt
* feat: rename to `greptime_builtin`
* fix: error handling for PyList datatype
* style: fix clippy warning
* test: for PyList
* feat: Python Coprocessor MVP (#180)
* feat: add get_arrow_op
* feat: add comparsion op(UNTESTED)
* doc: explain why no rich compare
* refactor: py_str2str&parse_keywords
* feat: add DecoratorArgs
* refactor: parse_keywords ret Deco Args
* style: remove unused
* doc: add todo
* style: remove some unused fn
* doc: add comment for copr's field
* feat: add copr_engine module
* refactor: move to `script` crate
* style: clean up cargo.toml
* feat: add query engine for copr engine
* refactor: deco args into separate struct
* test: update corrsponding test
* feat: async coprocessor engine
* refactor: add `exec_parsed` fn
* feat: sync version of coprocessor(UNTEST)
* refactor: remove useless lifetime
* feat: new type for async stream record batch
* merge: from PR#137 add py builtins
* toolchain: update rustc to nightly-08-16
* feat: add `exec_with_cached_vm` fn(Can't compile)
* toolchain: revert to 07-14
* fix: `exec_with_cached_vm`
* fix: allow vector[_] in params
* style: cargo fmt
* doc: update comment on `_`&`_|None`
* fix: allow import&ignore type anno is ok
* feat: allow ignore return types
* refsctor: remove unused py files in functions/
* style: fmt&clippy
* refactor: python modules (#186)
* refactor: move common/script to script
* fix: clippy warnings and refactor python modules
* refactor: remove modules mod rename tests mod
* feat: adds Script and ScriptEngine trait, then impl PyScript/PyScriptEngine
* refactor: remove pub use some functions in script
* refactor: python error mod
* refactor: coprocessor and vector
* feat: adds engine test and greptime.vector function to create vector from iterable
* fix: adds a blank line to cargo file end
* fix: compile error after rebase develop
* feat: script endpoint for http server (#206)
* feat: impl /scripts API for http server
* feat: adds http api version
* test: add test for scripts handler and endpoint
* feat: python side mock module and more builtin functions (#209)
* feat: add python side module(for both mock and real upload script)
* style: add *.pyc to gitignore
* feat: move copr decorator(in .py) to greptime.py
* doc: update comment for `datetime`&`mock_tester`&gitignore
* feat: `filter()` a array with bool array(UNTESTED)
* feat: `prev()`ious elem in array ret as new array(UNTEST)
* feat: `datetime()` parse date time string and ret integer(UNTEST)
* fix: add missing return&fmt
* fix: allow f32 cast to PyFloat
* fix: `datetime()`'s last token now parsed
* test: `calc_rvs` now can run with builtin module
* feat: allow rich compare which ret bool array
* feat: logic and(`&`) for bool array
* style: cargo fmt
* feat: index PyVector by bool array
* feat: alias `ln` as `log` in builtin modules
* feat: logic or(`|`)¬( `~`) for bool array
* feat: add `post` for @copr in py side mod
* feat: change datetime return to i64
* feat: py side mod `post` script to given address
* fix: add `engine` field in `post` in py side mod
* refactor: use `ConstantVector` in `pow()` builtin
* fix: prev ret err for zero array
* doc: rm comment out code
* test: incomplete pyside mod test case
* git: ignore all __pycache__
* style: fmt&clippy
* refactor: split py side module into exmaple&gptime
* feat: init_table in py using `v1/sql` api
* feat: calc_rvs now run both locally and remote
* doc: add doc for how to run it
* fix: comment out start server code in test
* fix: clippy warnings
* fix: http test url
* fix: some CR problems
* fix: some CR problems
* refactor: script executor for instance
* refactor: remove engine param in execute_script
* chore: Remove unnecessary allow attributes
Co-authored-by: Dennis Zhuang <killme2008@gmail.com>
Co-authored-by: Discord9 <discord9@163.com>
Co-authored-by: discord9 <zglzy29yzdk@gmail.com>
Co-authored-by: discord9 <55937128+discord9@users.noreply.github.com>
* feat: adds common-telemetry crate and logging mod
* refactor: common telemetry
* feat: adds metric mod and exports metrics by http
* feat: adds metrics to query engine and datanodes
* refactor: rename metrics
* refactor: rename ElapsedTimer struct and elapsed_timer macro
* refactor: log error when fail to new data node.
* fix: use backtrace crate instead of unstable feature
* feat: add must_use attr to Timer
* fix: only reserve Debug attribute for Timer