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

Catch and return sink writer error ERROR: column \“some_column\” is of type some_pg_type but expression is of type character varying` to user #16687

Open
kwannoel opened this issue May 10, 2024 · 4 comments
Assignees
Labels
type/bug Something isn't working

Comments

@kwannoel
Copy link
Contributor

Describe the bug

ERROR: column \“some_column\” is of type some_pg_type but expression is of type character varying.

 Hint: You will need to rewrite or cast the expression.
  Position: 271  Call getNextException to see other errors in the batch.
  at io.grpc.Status.asRuntimeException(Status.java:530)
  at com.risingwave.connector.JDBCSink.write(JDBCSink.java:196)
  at com.risingwave.connector.SinkWriterStreamObserver.onNext(SinkWriterStreamObserver.java:132)
  com.risingwave.connector.JniSinkWriterHandler.runJniSinkWriterThread(JniSinkWriterHandler.java:40)",

Can we propagate this error back to RW, on sink create?

Perhaps we can delay reporting the first barrier, write some records downstream first then:

  1. No error => yield first barrier, along with offsets.
  2. Error => Propagate error back.

Error message/log

No response

To Reproduce

No response

Expected behavior

No response

How did you deploy RisingWave?

No response

The version of RisingWave

No response

Additional context

No response

@kwannoel kwannoel added the type/bug Something isn't working label May 10, 2024
@github-actions github-actions bot added this to the release-1.10 milestone May 10, 2024
@kwannoel
Copy link
Contributor Author

Related #13035

@lmatz
Copy link
Contributor

lmatz commented May 30, 2024

Is this because it simply does not check whether the data types in RW and PostgreSQL mismatch or not,
or there is data type incompatibility issue as we test here: https://github.com/risingwavelabs/risingwave/blob/main/integration_tests/postgres-sink/create_source.sql#L46-L69

If it does not check the mismatch, I suppose we should add such test cases to the e2e test where the XXX in statement error XXX can be tested.

@StrikeW
Copy link
Contributor

StrikeW commented May 30, 2024

We did not check column types with downstream table right now. We can add the check during creation of a sink.

@lmatz
Copy link
Contributor

lmatz commented May 30, 2024

Got it, thanks
I am going through recent incidents and just want to make sure that tests cover them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants