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

not support pg json data as where conditions. #37

Open
LingangJiang opened this issue Jun 5, 2020 · 1 comment
Open

not support pg json data as where conditions. #37

LingangJiang opened this issue Jun 5, 2020 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@LingangJiang
Copy link

I have a json string field (called udmap) in clickhouse, when I handle it as PG json usage (udmap::jsonb -> 'src_stage')::int8 = 1 in where conditions, then error:

SELECT * FROM event WHERE (udmap::jsonb -> 'src_stage')::int8 = 1

错误: clickhouse_fdw:Code: 62, e.displayText() = DB::Exception: Syntax error: failed at position 83: -> 'src_stage'), 'Nullable(Int64)') = 1)). Expected one of: NOT, AS, LIKE, AND, OR, IN, BETWEEN, alias, token, IS, NOT LIKE, NOT IN, GLOBAL IN, GLOBAL NOT IN, Comma, QuestionMark
QUERY:SELECT udmap FROM test_cdp.t_customer_event WHERE ((cast((CAST(udmap AS jsonb(0)) -> 'src_stage'), 'Nullable(Int64)') = 1))

@LingangJiang
Copy link
Author

I'm very anxious to use this function, hope clickhouse_fdw can support PG json usage in where conditions, maybe it convert PG json some writing method to clickhouse json usage like https://clickhouse.tech/docs/en/sql-reference/functions/json-functions/

@ildus ildus added help wanted Extra attention is needed enhancement New feature or request labels Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants