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

[BUG][cnosdb fdw]If all fields in the external table are missing, reading and writing will fail. #2080

Open
Benxiaohai001 opened this issue Apr 19, 2024 · 1 comment
Assignees
Labels
type/bug Something isn't working

Comments

@Benxiaohai001
Copy link
Member

Describe the bug

If all fields in the external table are missing, reading and writing will fail.

To Reproduce

cnosdb-cli

CREATE TABLE air (visibility DOUBLE,temperature DOUBLE,pressure DOUBLE,TAGS(station));

gsql

openGauss=# create foreign table air (time timestamp, station text) server cnosdb_server options (tenant 'cnosdb', database 'public');
CREATE FOREIGN TABLE
openGauss=# INSERT INTO air (TIME, station) VALUES (now(), 'XiaoMaiDao1');
ERROR:  Fail to request remote server: sql: INSERT INTO public.air(time, station) VALUES (TIMESTAMP '2024-04-19 18:20:35.46244', 'XiaoMaiDao1'), reason: http status code: 422 Unprocessable Entity, response text: {"error_code":"020002","error_message":"Fields can't be empty"}
openGauss=#

Expected behavior

No response

Additional context

No response

@Benxiaohai001 Benxiaohai001 added the type/bug Something isn't working label Apr 19, 2024
@Kree0
Copy link
Contributor

Kree0 commented Apr 29, 2024

Because of the difficulty of coding, users now must check that the schema of the table in opengauss is the same as the schema of the table in cnosdb.

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

2 participants