Return-Path: X-Original-To: apmail-calcite-dev-archive@www.apache.org Delivered-To: apmail-calcite-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E51B11818F for ; Fri, 4 Dec 2015 18:57:42 +0000 (UTC) Received: (qmail 38130 invoked by uid 500); 4 Dec 2015 18:57:42 -0000 Delivered-To: apmail-calcite-dev-archive@calcite.apache.org Received: (qmail 38056 invoked by uid 500); 4 Dec 2015 18:57:42 -0000 Mailing-List: contact dev-help@calcite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@calcite.apache.org Delivered-To: mailing list dev@calcite.apache.org Delivered-To: moderator for dev@calcite.apache.org Received: (qmail 51881 invoked by uid 99); 4 Dec 2015 16:56:32 -0000 X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.879 X-Spam-Level: ** X-Spam-Status: No, score=2.879 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=S0NpBdYVSaaSj5+TDk3z04yxIdEZ6j/kw9nkai6dN8o=; b=rslIkf0rNBGpSiuQngz38y0GsyCSZxV303iCmOe61R7rNWooAwMz4ggNI4ALnVGffI ZPip7cJDMuiYQh7YSVUAbjp5iEF6b1BOebEj80i8ELddDTMMV2fLJ6XWO7paG8ge3HUt DXQoeH9I1iNzCvlthkshq9n9oc8O3e9Tt2VdHkpziGrLfK4ywfYGJHkr2oMPEC3Xoxsu 9KtyqiUroE8u7gr6+sbT2gXoQGl1BWZitMFGdl84sn+A0GFsVTM5olMUDQoHUD2I/EaN fLItB0V8uhd8BmQRu/E8VjgvDVUdfZ7aGxfzRkTaDBz8J0+XdllSipZnID/NvF28s9Hh kJUQ== X-Received: by 10.60.116.39 with SMTP id jt7mr13061252oeb.54.1449248190051; Fri, 04 Dec 2015 08:56:30 -0800 (PST) MIME-Version: 1.0 From: deepak pushpakar Date: Fri, 4 Dec 2015 22:25:50 +0530 Message-ID: Subject: Date Functions in calcite - MONTH($date) To: dev@calcite.apache.org Content-Type: multipart/alternative; boundary=089e011616828f3b0405261563ab --089e011616828f3b0405261563ab Content-Type: text/plain; charset=UTF-8 Hello Calcite Developers, We are using Calcite for validation and parsing of hive queries. When we try to include a MONTH() function in one of the select columns the query, the query fails telling that it is not expected. I went through the code base of 1.4.0 and 1.50 trying to understand what I can do myself by doing some change and building it. I also found that MONTH function is not yet implemented (mentioned in the calcite website. Any help appreciated. Example query: SELECT MONTH($DATE_COLUMN) AS MONTH_ID, COUNT($DATA_COLUMN) AS NUM_RECORDS FROM $RECORDS_TABLE WHERE $COL1 = 'SOME_VALUE' GROUP BY MONTH_ID ORDER BY NUM_RECORDS; Thanks Deepak Pushpakar --089e011616828f3b0405261563ab--