From notifications-return-50283-archive-asf-public=cust-asf.ponee.io@superset.apache.org Mon Sep 7 09:30:25 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mailroute1-lw-us.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with ESMTPS id 08AB8180181 for ; Mon, 7 Sep 2020 11:30:25 +0200 (CEST) Received: from mail.apache.org (localhost [127.0.0.1]) by mailroute1-lw-us.apache.org (ASF Mail Server at mailroute1-lw-us.apache.org) with SMTP id 36811121310 for ; Mon, 7 Sep 2020 09:30:24 +0000 (UTC) Received: (qmail 20440 invoked by uid 500); 7 Sep 2020 09:30:24 -0000 Mailing-List: contact notifications-help@superset.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@superset.apache.org Delivered-To: mailing list notifications@superset.apache.org Received: (qmail 20427 invoked by uid 99); 7 Sep 2020 09:30:24 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Sep 2020 09:30:24 +0000 From: =?utf-8?q?GitBox?= To: notifications@superset.apache.org Subject: =?utf-8?q?=5BGitHub=5D_=5Bincubator-superset=5D_GiannisDimitriou_commented_o?= =?utf-8?q?n_issue_=2310754=3A_Explore_PostgreSQL_Datasource_with_JSONB_arra?= =?utf-8?q?y_ERROR?= Message-ID: <159947102395.32230.13570080775162704159.asfpy@gitbox.apache.org> Date: Mon, 07 Sep 2020 09:30:23 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit In-Reply-To: References: GiannisDimitriou commented on issue #10754: URL: https://github.com/apache/incubator-superset/issues/10754#issuecomment-688198453 After checking PostgreSQL behaviour I see that a space is added automatically after the colon character when using the jsonb_agg function. I haven't check though what is the behaviour when trying to insert a json string explicitly in an json/jsonb column. So for this example adding the space on the filter clause only, its fine. Yeah I get your point I will check if there is any way to escape JSON and reply back. @villebro I don't think inserting non-spaced JSON objects in a JSON or JSONB column will cause trouble, it's only the query that needs to have the space. In fact the JSON object it self must have a space as well for this to work. Check this example..same error `SELECT * FROM ( SELECT * FROM ( VALUES (1::int,'[{"transaction_status":"SUCCESS","transaction_id":1},{"transaction_status":"SUCCESS","transaction_id":2}]'::jsonb), (2::int,'[{"transaction_status":"PENDING","transaction_id":3},{"transaction_status":"CANCEL","transaction_id":4}]'::jsonb) ) s(id, transaction_details) ) t WHERE transaction_details @> '[{"transaction_status":"SUCCESS","transaction_id": 1}]'` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org For additional commands, e-mail: notifications-help@superset.apache.org