Skip to content

[Bug] [SQL module] passed variable to create table, parameter passing error #17124

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

Open
3 tasks done
ZHCGitHub opened this issue Apr 11, 2025 · 6 comments
Open
3 tasks done
Labels
bug Something isn't working

Comments

@ZHCGitHub
Copy link

ZHCGitHub commented Apr 11, 2025

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

Image

Image
create sqlserver table error

What you expected to happen

test_20250411

How to reproduce

create table test_${dd}(
id int null
);

Custom parameters: dd in integer 20250411

Anything else

I can't believe this is an Apache project with millions of downloads. There is no version where existing features can be used without bugs. Even the most basic features have bugs. Many bugs have been raised in Git, but they have not been resolved in many versions. For example, the most basic SQL function, which dynamically creates table names using global parameters, should be a very simple function. As a result, MySQL will pass a global parameter and create a table with an error. Only by creating local parameters in the current task and creating an SQL Server table in the same way, the concatenated parameters are directly added to the table name to generate a table name test_@p0 This table name, along with other miscellaneous bugs, I have tried SQL as a basic feature from 2.1.70 to the latest 3.2.2, and none of them are bug free. I think you should focus on doing the basic functions well first, at least being able to use them normally like a normal project, and then consider the idea of adding other functions and upgrading, as well as the damn official documentation, which is simply unbearable. This makes me feel that this project does not deserve the honor of being a top-level Apache project

Version

3.2.x

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@ZHCGitHub ZHCGitHub added bug Something isn't working Waiting for reply Waiting for reply labels Apr 11, 2025
@ruanwenjun
Copy link
Member

I use Mysql, this works well on dev branch, not sure if this due to some interesting things in SqlServer, need to test on SqlServer.

@ZHCGitHub
Copy link
Author

ZHCGitHub commented Apr 11, 2025 via email

@ZHCGitHub
Copy link
Author

ZHCGitHub commented Apr 11, 2025 via email

@ruanwenjun
Copy link
Member

ruanwenjun commented Apr 11, 2025

This is a history problem, probably caused by the initialized design of SqlTask. We have many datasources, and all of them are using the same task plugin instance, so there are existing some cases that is difficultly to adapt it. e.g. fetch log, split sql...

The long term solution is to split the SqlTask into multiple sub task plugins on the backend to adapt different datasource.

Let's back to this case, the main reason is due the the sql task don't directly replace the parameter in the sql, but will use ? placeholder, we would better keep the simple logic here, directly replace the parameter in sql rather than use ?.

@ruanwenjun
Copy link
Member

I really hope that DS can become a top-level project for Apache, but you should develop and iterate new features on the basis that there are no functional bugs in the current version. So far, neither 3. x nor 2. x is bug free, and the most basic features cannot be used properly. A project that cannot use existing features properly will not be a successful project after multiple iterations, but will only make later changes more difficult. You should at least come up with a stable version where the basic features can be used normally

Some time ago, the project introduced too many untested and poorly designed features that were difficult to stabilize for a long time, many of which were not reviewed by most of the core maintainers, resulting in a messy codebase, and due to the fact that the core maintainers were all maintain it in their spare time, so the issue processing is slow.

A good change is that code merge has become more strict, which might improve the situation

@SbloodyS SbloodyS removed the Waiting for reply Waiting for reply label Apr 11, 2025
@ZHCGitHub
Copy link
Author

ZHCGitHub commented Apr 11, 2025 via email

@SbloodyS SbloodyS changed the title [Bug] [ SQL module] passed variable to create table, parameter passing error [Bug] [SQL module] passed variable to create table, parameter passing error Apr 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants