Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: The Tianmu engine supports user defined function #538

Closed
adofsauron opened this issue Sep 22, 2022 · 0 comments · Fixed by #929
Closed

feature: The Tianmu engine supports user defined function #538

adofsauron opened this issue Sep 22, 2022 · 0 comments · Fixed by #929
Assignees
Labels
A-feature feature with good idea

Comments

@adofsauron
Copy link
Collaborator

adofsauron commented Sep 22, 2022

Abstract:

The current column storage engine does not support custom functions. Previously, it used the Mysql/SQL layer to parse custom functions. But this led to a series of data errors.
This enables formal column storage engine-based support for custom functions.
This paper analyzes its requirements.

Functional Requirements:

  1. The result should be consistent with the result of InnoDB calling custom function to ensure the correctness of the result
  2. Do not use callback to the SQL layer to parse

The callback to the SQL layer will result in the coupling between the engine layer and the SQL layer, and the logical flow cannot be clearly understood

If the engine layer and SQL layer are tightly coupled, it is difficult to upgrade the mysql version

Each upgrade requires writing a call to the engine layer based on the implementation of the new mysql SQL layer

Each time, the call to the engine is rewritten, increasing the workload and increasing the time it takes to test the code

Custom functions only support mysql scalar data, not array or composite data types

  1. Compatible with mysql custom function scalar usage

  2. The return value of the function does not support json type and array compound type

Performance requirements:

1. the time required to call custom functions

Not planned, not considered

2. Upper limit of memory usage

Not planned, not considered

3. Upper limits on CPU usage

Not planned, not considered

@adofsauron adofsauron added the A-feature feature with good idea label Sep 22, 2022
@adofsauron adofsauron added this to the stonedb_5.7_v1.0.2 milestone Sep 22, 2022
@adofsauron adofsauron self-assigned this Sep 22, 2022
@adofsauron adofsauron changed the title feature: The Tianmu engine itself supports custom functions feature: The Tianmu engine supports user defined function Nov 7, 2022
mergify bot pushed a commit that referenced this issue Nov 14, 2022
Supports user-defined functions and is compatible with mysql scalar data.
This version does not support composite data types such as json.

The solution of generating derived tables without collections
for custom functions is currently quite radical,
and a more elegant solution will be completed in the next iteration.
@mergify mergify bot closed this as completed in #929 Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment