From notifications-return-27903-archive-asf-public=cust-asf.ponee.io@superset.apache.org Sat Sep 28 03:52:49 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 2359E180638 for ; Sat, 28 Sep 2019 05:52:49 +0200 (CEST) Received: (qmail 62674 invoked by uid 500); 28 Sep 2019 03:52:48 -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 62665 invoked by uid 99); 28 Sep 2019 03:52:48 -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; Sat, 28 Sep 2019 03:52:48 +0000 From: GitBox To: notifications@superset.apache.org Subject: [GitHub] [incubator-superset] villebro edited a comment on issue #8183: How to pass time filters to SQL Lab queries Message-ID: <156964276792.11272.10497755007215207885.gitbox@gitbox.apache.org> Date: Sat, 28 Sep 2019 03:52:47 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit villebro edited a comment on issue #8183: How to pass time filters to SQL Lab queries URL: https://github.com/apache/incubator-superset/issues/8183#issuecomment-536112676 @rubypollev the proposed approach makes sense, especially reusing existing code from `utils.core`. However, if memory serves me right, `BETWEEN` might mean different things depending on the dialect; sometimes inclusive, sometimes not (I might be wrong, though). I'm also not sure if it's supported on all engines. Anyway, In `connectors/sqla/models.py`, `get_time_filter()` creates `<=` and/or `>=` where clauses, so probably a good idea to stick to that logic. While it might be difficult to leverage existing SqlAlchemy Core functionality in this case (might be feasible, not sure), I think it makes sense to try to diverge from the default logic as much as possible. So prior to submitting a PR I would advise to at least change the `BETWEEN` operator to `<=` and/or `>=` operator(s), with additional bonus for utilizing any existing code. ---------------------------------------------------------------- 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 With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org For additional commands, e-mail: notifications-help@superset.apache.org