go-etl icon indicating copy to clipboard operation
go-etl copied to clipboard

fail: sql: expected 0 arguments, got 2

Open lxiangv opened this issue 9 months ago • 6 comments

config.json

when I use this config file expecting to query data which id is between 1 and 9, it runs fail as the pic below

image

lxiangv avatar May 11 '24 05:05 lxiangv

the log seems was incomplete, the err looks was the query failed.

Shane-XB-Qian avatar May 11 '24 15:05 Shane-XB-Qian

The issue arises when trying to split a table into one part. In this case, the job.setting has not been set, and therefore the number of tables to split into is set to 1.

Breeze0806 avatar May 13 '24 14:05 Breeze0806

that he/she pasted log was confused: expected 0 arguments, got 2, um... my first feeling was: it was set to split 1~9, but actually there was nothing can be done for split? so maybe if there had where clause would help?

Shane-XB-Qian avatar May 13 '24 14:05 Shane-XB-Qian

Haha, this is actually an issue caused by a misjudgment. Originally, my intention was that this judgment would speed up the program processing, but unfortunately, it resulted in this issue .

At 2024-05-13 22:41:02, "Shane-XB-Qian" @.***> wrote:

that he/she pasted log was confused: expected 0 arguments, got 2, um... my first feeling was: it was set to split 1~9, but actually there was nothing can be done for split? so maybe if there had where clause would help?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

Breeze0806 avatar May 13 '24 15:05 Breeze0806

@lxiangv Thank you for your feedback, now you can try again.

Breeze0806 avatar May 13 '24 15:05 Breeze0806

that he/she pasted log was confused: expected 0 arguments, got 2, um... my first feeling was: it was set to split 1~9, but actually there was nothing can be done for split? so maybe if there had where clause would help?

Yes,originally, when the table partition count was set to 1, we were in fact passing values for left and right to this SQL, but there was no need for parameter passing in the SQL itself, which led to this issue.

Breeze0806 avatar May 13 '24 15:05 Breeze0806