Skip to content

Conversation

sunng87
Copy link
Member

@sunng87 sunng87 commented Oct 17, 2025

I hereby agree to the terms of the GreptimeDB CLA.

Refer to a related PR or issue link (optional)

What's changed and what's your intention?

Successor of #7076 .

This patch is going to add a constructor of new json type. And introduces binary operators we developed on our datafusion fork.

PR Checklist

Please convert it to a draft if some of the following conditions are not met.

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.
  • This PR requires documentation updates.
  • API changes are backward compatible.
  • Schema or data changes are backward compatible.

@github-actions github-actions bot added size/L docs-not-required This change does not impact docs. labels Oct 17, 2025
@sunng87 sunng87 changed the title Feat/json constructor and operators feat: json constructor and operators Oct 17, 2025
shuiyisong and others added 18 commits October 20, 2025 03:11
chore: add information extension to the plugins

Signed-off-by: shuiyisong <[email protected]>
* refactor: remove unused grpc-expr module and pb conversions

* chore: remove unused snafu
Signed-off-by: greptimedb-ci <[email protected]>
Co-authored-by: greptimedb-ci <[email protected]>
* feat: struct value

Signed-off-by: Ning Sun <[email protected]>

* feat: update for proto module

* feat: wip struct type

* feat: implement more vector operations

* feat: make datatype and api

* feat: reoslve some compilation issues

* feat: resolve all compilation issues

* chore: format update

* test: resolve tests

* test: test and refactor value-to-pb

* feat: add more tests and fix for value types

* chore: remove dbg

* feat: test and fix iterator

* fix: resolve struct_type issue

* feat: pgwire 0.33 update

* refactor: use vec for struct items

* feat: conversion from json to value

* feat: add decode function

* fix: lint issue

* feat: update how we encode raw data

* feat: add convertion to fully strcutured StructValue

* refactor: take owned value in all encode/decode functions

* feat: add pg serialization of structvalue

* chore: toml format

* refactor: adopt new and try_new from struct value

* chore: cleanup residual issues

* docs: docs up

* fix lint issue

* Apply suggestion from @MichaelScofield

Co-authored-by: LFC <[email protected]>

* Apply suggestion from @MichaelScofield

Co-authored-by: LFC <[email protected]>

* Apply suggestion from @MichaelScofield

Co-authored-by: LFC <[email protected]>

* Apply suggestion from @MichaelScofield

Co-authored-by: LFC <[email protected]>

* chore: address review comment especially collection capacity

* refactor: remove unneeded processed keys collection

---------

Signed-off-by: Ning Sun <[email protected]>
Co-authored-by: LFC <[email protected]>
* initial impl

Signed-off-by: Ruihang Xia <[email protected]>

* sqlness tests

Signed-off-by: Ruihang Xia <[email protected]>

* tidy up

Signed-off-by: Ruihang Xia <[email protected]>

---------

Signed-off-by: Ruihang Xia <[email protected]>
* feat: add updated_on to tablemeta with a default of created_on

Signed-off-by: Alan Tang <[email protected]>

* feat: support the update_on on alter procedure

Signed-off-by: Alan Tang <[email protected]>

* feat: add updated_on into information_schema.tables

Signed-off-by: Alan Tang <[email protected]>

* fix: make sqlness happy

Signed-off-by: Alan Tang <[email protected]>

* test: add test case for tablemeta update

Signed-off-by: Alan Tang <[email protected]>

* fix: fix failing test for ALTER TABLE

Signed-off-by: Alan Tang <[email protected]>

* feat: use created_on as default for updated_on when missing

Signed-off-by: Alan Tang <[email protected]>

---------

Signed-off-by: Alan Tang <[email protected]>
* feat: struct value

Signed-off-by: Ning Sun <[email protected]>

* feat: update for proto module

* feat: wip struct type

* feat: implement more vector operations

* feat: make datatype and api

* feat: reoslve some compilation issues

* feat: resolve all compilation issues

* chore: format update

* test: resolve tests

* test: test and refactor value-to-pb

* feat: add more tests and fix for value types

* chore: remove dbg

* feat: test and fix iterator

* fix: resolve struct_type issue

* feat: pgwire 0.33 update

* refactor: use vec for struct items

* feat: conversion from json to value

* feat: add decode function

* fix: lint issue

* feat: update how we encode raw data

* feat: add convertion to fully strcutured StructValue

* refactor: take owned value in all encode/decode functions

* feat: add pg serialization of structvalue

* chore: toml format

* refactor: adopt new and try_new from struct value

* chore: cleanup residual issues

* docs: docs up

* fix lint issue

* Apply suggestion from @MichaelScofield

Co-authored-by: LFC <[email protected]>

* Apply suggestion from @MichaelScofield

Co-authored-by: LFC <[email protected]>

* Apply suggestion from @MichaelScofield

Co-authored-by: LFC <[email protected]>

* Apply suggestion from @MichaelScofield

Co-authored-by: LFC <[email protected]>

* chore: address review comment especially collection capacity

* refactor: remove unneeded processed keys collection

* feat: Value::Json type

* chore: add some work in progress changes

* feat: adopt new json type

* refactor: limit scope json conversion functions

* fix: self review update

* test: provide tests for value::json

* test: add tests for api/helper

* switch proto to main branch

* fix: implement is_null for ValueRef::Json

---------

Signed-off-by: Ning Sun <[email protected]>
Co-authored-by: LFC <[email protected]>
* fix: part cols not in projection

Signed-off-by: discord9 <[email protected]>

* test: table scan with projection

Signed-off-by: discord9 <[email protected]>

* Update src/query/src/dist_plan/analyzer.rs

Co-authored-by: Yingwen <[email protected]>
Signed-off-by: discord9 <[email protected]>

---------

Signed-off-by: discord9 <[email protected]>
Co-authored-by: Yingwen <[email protected]>
* feat/manual-compaction-parallelism:
 ### Add Parallelism Support to Compaction Requests

 - **`Cargo.lock` & `Cargo.toml`**: Updated `greptime-proto` dependency to a new revision.
 - **`flush_compact_table.rs`**: Enhanced `parse_compact_params` to support a new `parallelism` parameter, allowing users to
 specify the level of parallelism for table compaction.
 - **`handle_compaction.rs`**: Integrated `parallelism` into the compaction scheduling process, defaulting to 1 if not
 specified.
 - **`request.rs` & `region_request.rs`**: Modified `CompactRequest` to include `parallelism`, with logic to handle unspecifie
 values.
 - **`requests.rs`**: Updated `CompactTableRequest` structure to include an optional `parallelism` field.

Signed-off-by: Lei, HUANG <[email protected]>

* feat/manual-compaction-parallelism:
 ### Commit Message

 Enhance Compaction Request Handling

 - **`flush_compact_table.rs`**:
   - Renamed `parse_compact_params` to `parse_compact_request`.
   - Introduced `DEFAULT_COMPACTION_PARALLELISM` constant.
   - Updated parsing logic to handle keyword arguments for `strict_window` and `regular` compaction types, including `parallelism` and `window`.
   - Modified tests to reflect changes in parsing logic and default parallelism handling.

 - **`request.rs`**:
   - Updated `parallelism` handling in `RegionRequestBody::Compact` to use the new default value.

 - **`requests.rs`**:
   - Changed `CompactTableRequest` to use a non-optional `parallelism` field with a default value of 1.

Signed-off-by: Lei, HUANG <[email protected]>

* feat/manual-compaction-parallelism:
 ### Update `flush_compact_table.rs` Parameter Validation

 - Modified parameter validation in `flush_compact_table.rs` to restrict the maximum number of parameters from 4 to 3 in the `parse_compact_request` function.

Signed-off-by: Lei, HUANG <[email protected]>

* feat/manual-compaction-parallelism:
 Update `greptime-proto` dependency

 - Updated the `greptime-proto` dependency to a new revision in both `Cargo.lock` and `Cargo.toml`.

Signed-off-by: Lei, HUANG <[email protected]>

---------

Signed-off-by: Lei, HUANG <[email protected]>
* feat: seq range memtable read

Signed-off-by: discord9 <[email protected]>

* test: from&range

Signed-off-by: discord9 <[email protected]>

* wt

Signed-off-by: discord9 <[email protected]>

* after rebase fix

Signed-off-by: discord9 <[email protected]>

* refactor: per review

Signed-off-by: discord9 <[email protected]>

* docs: better naming&emphaise

Signed-off-by: discord9 <[email protected]>

* refactor: use filter method

Signed-off-by: discord9 <[email protected]>

* tests: unwrap

Signed-off-by: discord9 <[email protected]>

---------

Signed-off-by: discord9 <[email protected]>
…fo` table (#7050)

* refactor: add `hostname` in cluster_info table

Signed-off-by: zyy17 <[email protected]>

* chore: update information schema result

Signed-off-by: zyy17 <[email protected]>

* chore: apply code review comments

Signed-off-by: zyy17 <[email protected]>

* chore: update greptime-proto

Signed-off-by: zyy17 <[email protected]>

* chore: add the compatibility for old proto

Signed-off-by: zyy17 <[email protected]>

---------

Signed-off-by: zyy17 <[email protected]>
* refactor: add `get_total_cpu_millicores()` / `get_total_cpu_cores()` / `get_total_memory_bytes()` / `get_total_memory_readable()` in common-stat

Signed-off-by: zyy17 <[email protected]>

* tests: update sqlness test cases

Signed-off-by: zyy17 <[email protected]>

---------

Signed-off-by: zyy17 <[email protected]>
* feat: supports large string

Signed-off-by: Dennis Zhuang <[email protected]>

* chore: add doc for extract_string_vector_values

Co-authored-by: Copilot <[email protected]>
Signed-off-by: Dennis Zhuang <[email protected]>

* chore: refactor by cr comments

Signed-off-by: Dennis Zhuang <[email protected]>

* chore: changes by cr comments

Signed-off-by: Dennis Zhuang <[email protected]>

* refactor: extract_string_vector_values

Signed-off-by: Dennis Zhuang <[email protected]>

* feat: remove large string type and refactor string vector

Signed-off-by: Dennis Zhuang <[email protected]>

* chore: revert some changes

Signed-off-by: Dennis Zhuang <[email protected]>

* feat: adds large string type

Signed-off-by: Dennis Zhuang <[email protected]>

* chore: impl default for StringSizeType

Signed-off-by: Dennis Zhuang <[email protected]>

* fix: tests and test compatibility

Signed-off-by: Dennis Zhuang <[email protected]>

* test: update sqlness tests

Signed-off-by: Dennis Zhuang <[email protected]>

* chore: remove panic

Signed-off-by: Dennis Zhuang <[email protected]>

---------

Signed-off-by: Dennis Zhuang <[email protected]>
Co-authored-by: Copilot <[email protected]>
* feat: support for and keep_firing_for optiosn in create trigger

* upgrade greptime-proto
MichaelScofield and others added 5 commits October 20, 2025 03:11
* feat: new create table syntax for new json datatype

Signed-off-by: luofucong <[email protected]>

* refactor: extract consts

* refactor: remove unused error variant

* fix tests

Signed-off-by: luofucong <[email protected]>

* fix sqlness

Signed-off-by: luofucong <[email protected]>

---------

Signed-off-by: luofucong <[email protected]>
Co-authored-by: Ning Sun <[email protected]>
* Add encode/decode helpers for IndexTarget

Signed-off-by: Zhenchi <[email protected]>

* Use IndexTarget encode for puffin index blob keys

Signed-off-by: Zhenchi <[email protected]>

* Normalize puffin index blobs to use IndexTarget keys

Signed-off-by: Zhenchi <[email protected]>

* feat(mito2): expose puffin index metadata

Signed-off-by: Zhenchi <[email protected]>

* target json polish

Signed-off-by: Zhenchi <[email protected]>

* fix header

Signed-off-by: Zhenchi <[email protected]>

* add index path

Signed-off-by: Zhenchi <[email protected]>

* address copilot comments

Signed-off-by: Zhenchi <[email protected]>

* address comments

Signed-off-by: Zhenchi <[email protected]>

* reuse cached index metadata

Signed-off-by: Zhenchi <[email protected]>

* parallelism for reading index meta

Signed-off-by: Zhenchi <[email protected]>

---------

Signed-off-by: Zhenchi <[email protected]>
@github-actions github-actions bot added size/XXL and removed size/L labels Oct 19, 2025
@sunng87 sunng87 force-pushed the feat/json-constructor-and-operators branch from 0fc3c64 to e9255c5 Compare October 19, 2025 22:20
@sunng87 sunng87 force-pushed the feat/json-constructor-and-operators branch from e9255c5 to 0355923 Compare October 19, 2025 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-not-required This change does not impact docs. size/XXL

Projects

None yet

Development

Successfully merging this pull request may close these issues.