* chore: refactor dir for local catalog manager
* refactor: CatalogProvider returns Result
* refactor: SchemaProvider returns Result
* feat: add kv operations to remote catalog
* chore: refactor some code
* feat: impl catalog initialization
* feat: add register table and register system table function
* refactor: add table_info method for Table trait
* chore: add some tests
* chore: add register schema test
* chore: fix build issue after rebase onto develop
* refactor: mock to separate file
* build: failed to compile
* fix: use a container struct to bridge KvBackend and Accessor trait
* feat: upgrade opendal to 0.17
* test: add more tests
* chore: add catalog name and schema name to table info
* chore: add catalog name and schema name to table info
* chore: rebase onto develop
* refactor: common-catalog crate
* chore: refactor dir for local catalog manager
* refactor: CatalogProvider returns Result
* refactor: SchemaProvider returns Result
* feat: add kv operations to remote catalog
* chore: refactor some code
* feat: impl catalog initialization
* feat: add register table and register system table function
* refactor: add table_info method for Table trait
* chore: add some tests
* chore: add register schema test
* chore: fix build issue after rebase onto develop
* refactor: mock to separate file
* build: failed to compile
* fix: use a container struct to bridge KvBackend and Accessor trait
* feat: upgrade opendal to 0.17
* test: add more tests
* chore: add catalog name and schema name to table info
* chore: add catalog name and schema name to table info
* chore: rebase onto develop
* refactor: common-catalog crate
* refactor: remove remote catalog related files
* fix: compilation
* feat: add table version to TableKey
* feat: add node id to TableValue
* fix: some CR comments
* chore: change async fn create_expr_to_request to sync
* fix: add backtrace to errors
* fix: code style
* refactor: merge refactor/catalog-crate
* feat: table key with version
* feat: impl KvBackend for MetaClient
* fix: integrate metaclient
* fix: catalog use local table info as baseline
* fix: sync metsrv
* fix: wip
* fix: update remote catalog on register and deregister
* refactor: CatalogProvider
* refactor: CatalogManager
* fix: catalog key filtering
* fix: pass some test
* refactor: catalog iterating
* fix: CatalogManager::table also requires both catalog_name and schema_name
* chore: merge develop
* chore: merge catalog crate
* fix: adapt to recent meta-client api change
* feat: databode lease
* feat: remote catalog (#356)
* chore: refactor dir for local catalog manager
* refactor: CatalogProvider returns Result
* refactor: SchemaProvider returns Result
* feat: add kv operations to remote catalog
* chore: refactor some code
* feat: impl catalog initialization
* feat: add register table and register system table function
* refactor: add table_info method for Table trait
* chore: add some tests
* chore: add register schema test
* chore: fix build issue after rebase onto develop
* refactor: mock to separate file
* build: failed to compile
* fix: use a container struct to bridge KvBackend and Accessor trait
* feat: upgrade opendal to 0.17
* test: add more tests
* chore: add catalog name and schema name to table info
* chore: add catalog name and schema name to table info
* chore: rebase onto develop
* refactor: common-catalog crate
* chore: refactor dir for local catalog manager
* refactor: CatalogProvider returns Result
* refactor: SchemaProvider returns Result
* feat: add kv operations to remote catalog
* chore: refactor some code
* feat: impl catalog initialization
* feat: add register table and register system table function
* refactor: add table_info method for Table trait
* chore: add some tests
* chore: add register schema test
* chore: fix build issue after rebase onto develop
* refactor: mock to separate file
* build: failed to compile
* fix: use a container struct to bridge KvBackend and Accessor trait
* feat: upgrade opendal to 0.17
* test: add more tests
* chore: add catalog name and schema name to table info
* chore: add catalog name and schema name to table info
* chore: rebase onto develop
* refactor: common-catalog crate
* refactor: remove remote catalog related files
* fix: compilation
* feat: add table version to TableKey
* feat: add node id to TableValue
* fix: some CR comments
* chore: change async fn create_expr_to_request to sync
* fix: add backtrace to errors
* fix: code style
* refactor: merge refactor/catalog-crate
* feat: table key with version
* feat: impl KvBackend for MetaClient
* fix: integrate metaclient
* fix: catalog use local table info as baseline
* fix: sync metsrv
* fix: wip
* fix: update remote catalog on register and deregister
* refactor: CatalogProvider
* refactor: CatalogManager
* fix: catalog key filtering
* fix: pass some test
* refactor: catalog iterating
* fix: CatalogManager::table also requires both catalog_name and schema_name
* chore: merge develop
* chore: merge catalog crate
* fix: adapt to recent meta-client api change
* feat: datanode heartbeat (#355)
* feat: add heartbeat task to instance
* feat: add node_id datanode opts
* fix: use real node id in heartbeat and meta client
* feat: distribute table in frontend
* test: distribute read demo
* test: distribute read demo
* test: distribute read demo
* add write spliter
* fix: node id changed to u64
* feat: datanode uses remote catalog implementation
* dist insert integrate table
* feat: specify region ids on creating table (#359)
* fix: compiling issues
* feat: datanode lease (#354)
* Some glue code about dist_insert
* fix: correctly wrap string value with quotes
* feat: create route
* feat: frontend catalog (#362)
* feat: integrate catalog to frontend
* feat: preserve partition rule on create
* fix: print tables on start
* chore: log in create route
* test: distribute read demo
* feat: support metasrv addr command line options
* feat: optimize DataNodeInstance creation (#368)
* chore: remove unnecessary changes
* chore: revert changes to src/api
* chore: revert changes to src/datanode/src/server.rs
* chore: remove opendal backend
* chore: optimize imports
* chore: revert changes to instance and region ids
* refactor: MetaKvBackend range
* fix: remove some wrap
* refactor: initiation of catalog
* feat: add region id to create table request and add heartbeat task to datanode instance
* fix: fix auto reconnect for heartbeat task
* chore: change TableValue::region_numbers to vec<u32>.
* fix: some tests
* fix: avoid concurrently start Heartbeat task by compare_exchange
* fix: some cr comments
* fix: fix unit tests
Co-authored-by: jiachun <jiachun_fjc@163.com>
Co-authored-by: luofucong <luofucong@greptime.com>
Co-authored-by: fys <1113014250@qq.com>
Co-authored-by: Jiachun Feng <jiachun_feng@proton.me>
* chore: refactor dir for local catalog manager
* refactor: CatalogProvider returns Result
* refactor: SchemaProvider returns Result
* feat: add kv operations to remote catalog
* chore: refactor some code
* feat: impl catalog initialization
* feat: add register table and register system table function
* refactor: add table_info method for Table trait
* chore: add some tests
* chore: add register schema test
* chore: fix build issue after rebase onto develop
* refactor: mock to separate file
* build: failed to compile
* fix: use a container struct to bridge KvBackend and Accessor trait
* feat: upgrade opendal to 0.17
* test: add more tests
* chore: add catalog name and schema name to table info
* chore: add catalog name and schema name to table info
* chore: rebase onto develop
* refactor: common-catalog crate
* chore: refactor dir for local catalog manager
* refactor: CatalogProvider returns Result
* refactor: SchemaProvider returns Result
* feat: add kv operations to remote catalog
* chore: refactor some code
* feat: impl catalog initialization
* feat: add register table and register system table function
* refactor: add table_info method for Table trait
* chore: add some tests
* chore: add register schema test
* chore: fix build issue after rebase onto develop
* refactor: mock to separate file
* build: failed to compile
* fix: use a container struct to bridge KvBackend and Accessor trait
* feat: upgrade opendal to 0.17
* test: add more tests
* chore: add catalog name and schema name to table info
* chore: add catalog name and schema name to table info
* chore: rebase onto develop
* refactor: common-catalog crate
* refactor: remove remote catalog related files
* fix: compilation
* feat: add table version to TableKey
* feat: add node id to TableValue
* fix: some CR comments
* chore: change async fn create_expr_to_request to sync
* fix: add backtrace to errors
* fix: code style
* refactor: merge refactor/catalog-crate
* feat: table key with version
* feat: impl KvBackend for MetaClient
* fix: integrate metaclient
* fix: catalog use local table info as baseline
* fix: sync metsrv
* fix: wip
* fix: update remote catalog on register and deregister
* refactor: CatalogProvider
* refactor: CatalogManager
* fix: catalog key filtering
* fix: pass some test
* refactor: catalog iterating
* fix: CatalogManager::table also requires both catalog_name and schema_name
* chore: merge develop
* chore: merge catalog crate
* fix: adapt to recent meta-client api change
* feat: databode lease
* feat: remote catalog (#356)
* chore: refactor dir for local catalog manager
* refactor: CatalogProvider returns Result
* refactor: SchemaProvider returns Result
* feat: add kv operations to remote catalog
* chore: refactor some code
* feat: impl catalog initialization
* feat: add register table and register system table function
* refactor: add table_info method for Table trait
* chore: add some tests
* chore: add register schema test
* chore: fix build issue after rebase onto develop
* refactor: mock to separate file
* build: failed to compile
* fix: use a container struct to bridge KvBackend and Accessor trait
* feat: upgrade opendal to 0.17
* test: add more tests
* chore: add catalog name and schema name to table info
* chore: add catalog name and schema name to table info
* chore: rebase onto develop
* refactor: common-catalog crate
* chore: refactor dir for local catalog manager
* refactor: CatalogProvider returns Result
* refactor: SchemaProvider returns Result
* feat: add kv operations to remote catalog
* chore: refactor some code
* feat: impl catalog initialization
* feat: add register table and register system table function
* refactor: add table_info method for Table trait
* chore: add some tests
* chore: add register schema test
* chore: fix build issue after rebase onto develop
* refactor: mock to separate file
* build: failed to compile
* fix: use a container struct to bridge KvBackend and Accessor trait
* feat: upgrade opendal to 0.17
* test: add more tests
* chore: add catalog name and schema name to table info
* chore: add catalog name and schema name to table info
* chore: rebase onto develop
* refactor: common-catalog crate
* refactor: remove remote catalog related files
* fix: compilation
* feat: add table version to TableKey
* feat: add node id to TableValue
* fix: some CR comments
* chore: change async fn create_expr_to_request to sync
* fix: add backtrace to errors
* fix: code style
* refactor: merge refactor/catalog-crate
* feat: table key with version
* feat: impl KvBackend for MetaClient
* fix: integrate metaclient
* fix: catalog use local table info as baseline
* fix: sync metsrv
* fix: wip
* fix: update remote catalog on register and deregister
* refactor: CatalogProvider
* refactor: CatalogManager
* fix: catalog key filtering
* fix: pass some test
* refactor: catalog iterating
* fix: CatalogManager::table also requires both catalog_name and schema_name
* chore: merge develop
* chore: merge catalog crate
* fix: adapt to recent meta-client api change
* feat: datanode heartbeat (#355)
* feat: add heartbeat task to instance
* feat: add node_id datanode opts
* fix: use real node id in heartbeat and meta client
* feat: distribute table in frontend
* test: distribute read demo
* test: distribute read demo
* test: distribute read demo
* add write spliter
* fix: node id changed to u64
* feat: datanode uses remote catalog implementation
* dist insert integrate table
* feat: specify region ids on creating table (#359)
* fix: compiling issues
* feat: datanode lease (#354)
* Some glue code about dist_insert
* fix: correctly wrap string value with quotes
* feat: create route
* feat: frontend catalog (#362)
* feat: integrate catalog to frontend
* feat: preserve partition rule on create
* fix: print tables on start
* chore: log in create route
* test: distribute read demo
* feat: support metasrv addr command line options
* feat: optimize DataNodeInstance creation (#368)
* chore: remove unnecessary changes
* chore: revert changes to src/api
* chore: revert changes to src/datanode/src/server.rs
* chore: remove opendal backend
* chore: optimize imports
* chore: revert changes to instance and region ids
* refactor: MetaKvBackend range
* fix: remove some wrap
* refactor: initiation of catalog
* fix: next range request start key
* fix: mock delete range
* refactor: simplify range response handling
Co-authored-by: jiachun <jiachun_fjc@163.com>
Co-authored-by: luofucong <luofucong@greptime.com>
Co-authored-by: fys <1113014250@qq.com>
Co-authored-by: Jiachun Feng <jiachun_feng@proton.me>
* chore: meta mock
* chore: refacor datanode selector
* chore: create route mock test
* chore: add mock module
* chore: memory store for test
* chore: mock meta for test
* chore: ensure memorysotre has the same behavious with etcd
* chore: replace tokio lock to parking_lot
This patch changes output for our http SQL API and prepare it for our SQL editor development. Changes includes:
- includes aide for OAS 3.1 openapi documents, available at /v1/private/api.json
- simplified some of http handlers return type, use string or json directly
- created new HttpRecordsOutput type to hide internals of RecordBatch from end-user. It also tuned data structure to be friendly for application to consume
- updated response struct to use code for success or detailed error code
Residual issue #366
* feat: allow http post for our sql http api
* feat: update our http api and attempt to add openapi spec support
* test: correct test against new handler apis
* refactor: rename rows to records
* refactor: removed HttpResponse completely
* feat: add information to our openapi docs
* feat: add docs for sql interface response
* refactor: use struct to represent query so we can doc it via aide
* refactor: use arc wrapped api
* feat: add redoc UI support
* Update src/servers/src/http.rs
Co-authored-by: LFC <bayinamine@gmail.com>
* Update src/servers/src/http.rs
Co-authored-by: LFC <bayinamine@gmail.com>
* fix: address review comments
* test: update integration tests for new api output
* refactor: make prometheus http apis compatible with recent changes
* refactor: get schema from stream
* test: add test for recordbatch to json serialization
* test: add todo for a test to be fixed later
* Revert "test: add todo for a test to be fixed later"
This reverts commit a5a50c7afb.
* fix: Revert "refactor: get schema from stream"
This reverts commit 945b685556.
* chore: add todo for pending issue #366
* chore: remove fixed server url in openapi docs
* feat: include error_code in json response
* refactor: use code over success field in json response
Co-authored-by: LFC <bayinamine@gmail.com>
* feat: scaffold for prometheus protocol handler
* feat: impl remote write and read for prometheus
* chore: make label matchers working in remote reading
* chore: case senstive regexp matching for labers and tweak restful api
* test: prometheus test
* test: adds test for prometheus handler and http server
* fix: typo in comment
* refactor: move snappy_compress and snappy_decompress
* fix: by code review
* fix: collect_timeseries_ids
* fix: timestamp and value column's value may be null
* chore: refactor dir for local catalog manager
* refactor: CatalogProvider returns Result
* refactor: SchemaProvider returns Result
* feat: add kv operations to remote catalog
* chore: refactor some code
* feat: impl catalog initialization
* feat: add register table and register system table function
* refactor: add table_info method for Table trait
* chore: add some tests
* chore: add register schema test
* chore: fix build issue after rebase onto develop
* refactor: mock to separate file
* build: failed to compile
* fix: use a container struct to bridge KvBackend and Accessor trait
* feat: upgrade opendal to 0.17
* test: add more tests
* chore: add catalog name and schema name to table info
* chore: add catalog name and schema name to table info
* chore: rebase onto develop
* refactor: common-catalog crate
* refactor: remove remote catalog related files
* fix: compilation
* feat: add table version to TableKey
* feat: add node id to TableValue
* fix: some CR comments
* chore: change async fn create_expr_to_request to sync
* fix: add backtrace to errors
* fix: code style
* fix: CatalogManager::table also requires both catalog_name and schema_name
* chore: merge develop
* refactor: return PhysicalPlan in Table trait's scan method, to support partitioned execution in Frontend's distribute read
* refactor: pub use necessary DataFusion types
* refactor: replace old "PhysicalPlan" and its adapters
Co-authored-by: luofucong <luofucong@greptime.com>
Co-authored-by: Yingwen <realevenyag@gmail.com>
* refactor: add table_info method for Table trait
* feat: add table_info method to Table trait
* test: add more unit test
* fix: impl table_info for SystemTable
* test: fix failing test
* meta: meta api&client
* meta: heartbeat server init
* feat: kv store
* chore: grpc server
* chore: meta server bootstrap
* feat: heartbeat client
* feat: route for create table
* chore: a channel pool manager
* feat: route client
* feat: store client
* chore: meta_client example
* chore: change schema
* chore: unit test & by cr
* chore: refactor meta client
* chore: add unit test
* refactor:replace another axum-test-helper branch
* refactor: upgrade opendal version
* refactor: use cursor for file buffer
* refactor:remove native-tls in mysql_async
* refactor: use async block and pipeline for newer opendal api
* chore: update Cargo.lock
* chore: update dependencies
* docs: removed openssl from build requirement
* fix: call close on pipe writer to flush reader for parquet streamer
* refactor: remove redundant return
* chore: use pinned revision for our forked mysql_async
* style: avoid wild-card import in test code
* Apply suggestions from code review
Co-authored-by: Yingwen <realevenyag@gmail.com>
* style: use chained call for builder
Co-authored-by: liangxingjian <965662709@qq.com>
Co-authored-by: Yingwen <realevenyag@gmail.com>
* feat: add type conversion optimizer
* feat: add expr rewrite logical plan optimizer
* chore: add some doc
* fix: unit test
* fix: time zone issue in unit tests
* chore: add more tests
* fix: some CR comments
* chore: rebase develop
* chore: fix unit tests
* fix: unit test use timestamp with time zone
* chore: add more tests
* wip add predicate definition
* fix value move
* implement predicate and prune
* impl filter push down in chunk reader
* add more expr tests
* chore: rebase develop
* fix: unit test
* fix: field name/index lookup when building pruning stats
* chore: add some meaningless test
* fix: remove unnecessary extern crate
* fix: use datatypes::schema::SchemaRef
* feat: initial commit of postgres protocol adapter
* initial commit of postgres server
* feat: use common_io runtime and correct testcase
* fix previous tests
* feat: adopt pgwire api changes and add support for text encoded data
* feat: initial integration with datanode
* test: add feature flag to test
* fix: resolve lint warnings
* feat: add postgres feature flags for datanode
* feat: add support for newly introduced timestamp type
* feat: adopt latest datanode changes
* fix: address clippy warning for flattern scenario
* fix: make clippy great again
* fix: address issues found in review
* chore: sort dependencies by name
* feat: adopt new Output api
* fix: return error on unsupported data types
* refactor: extract common code dealing with record batches
* fix: resolve clippy warnings
* test: adds some unit tests postgres handler
* test: correct test for cargo update
* fix: update query module name
* test: add assertion for error content
* feat: frontend instance
* no need to carry column length in `Column` proto
* add more tests
* rebase develop
* create a new variant with already provisioned RecordBatches in Output
* resolve code review comments
* new frontend instance does not connect datanode grpc
* add more tests
* add more tests
* rebase develop
Co-authored-by: luofucong <luofucong@greptime.com>
* feat: impl scripts table and /execute restful api
* fix: test failures
* fix: test failures
* feat: impl /run_script API
* refactor: rename run_script api to run-script and test script manager
* fix: remove println
* refactor: error mod
* refactor: by CR comments
* feat: rebase develop and change timestamp/gmt_crated/gmt_modified type to timestamp
* refactor: use assert_eq instread of assert
* doc: fix comment in Script#execute function
* wip: impl timestamp data type
* add timestamp vectors
* adapt to recent changes to vector module
* fix all unit test
* rebase develop
* fix slice
* change default time unit to millisecond
* add more tests
* fix some CR comments
* fix some CR comments
* fix clippy
* fix some cr comments
* fix some CR comments
* fix some CR comments
* remove time unit in LogicalTypeId::Timestamp
* feat: implement alter table
* Currently we have no plans to support altering the primary keys (maybe never), so removed the related codes.
* make `alter` a trait function in table
* address other CR comments
* cleanup
* rebase develop
* resolve code review comments
Co-authored-by: luofucong <luofucong@greptime.com>
* 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>
* wip: add Date type and value
* fix some cr comments
* impl Date values
* finish date type
* optimize Date value serialization
* add some tests
* fix some cr comments
* add some more test
* address PR comments
address PR comments
use 3306 for mysql server's default port
upgrade metric to version 0.20
move crate "servers" out of "common"
make mysql io threads count configurable in config file
add snafu backtrace for errors with source
use common-server error for mysql server
add test for grpc server
refactor testing codes
fix rustfmt check
start mysql server in datanode
move grpc server codes from datanode to common-servers
feat: unify servers
* rebase develop and resolve conflicts
* remove an unnecessary todo
Co-authored-by: luofucong <luofucong@greptime.com>
* catalog manager allocates table id
* rebase develop
* add some tests
* add some more test
* fix some cr comments
* insert into system catalog
* use slice pattern to simplify code
* add optional dependencies
* add sql-to-request test
* successfully recover
* fix unit tests
* rebase develop
* add some tests
* fix some cr comments
* fix some cr comments
* add a lock to CatalogManager
* feat: add gmt_created and gmt_modified columns to system catalog table
* SelectExpr: change to oneof expr
* Convert between Vec<u8> and SelectResult
* Chore: use encode_to_vec and decode, instead of encode_length_delimited_to_vec and decode_length_delimited
* Chore: move bitset into separate file
* Grpc select impl