Return-Path: X-Original-To: apmail-pig-dev-archive@www.apache.org Delivered-To: apmail-pig-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 1C2BB10871 for ; Thu, 14 Nov 2013 20:05:24 +0000 (UTC) Received: (qmail 81427 invoked by uid 500); 14 Nov 2013 20:05:23 -0000 Delivered-To: apmail-pig-dev-archive@pig.apache.org Received: (qmail 81365 invoked by uid 500); 14 Nov 2013 20:05:23 -0000 Mailing-List: contact dev-help@pig.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pig.apache.org Delivered-To: mailing list dev@pig.apache.org Received: (qmail 81303 invoked by uid 500); 14 Nov 2013 20:05:22 -0000 Delivered-To: apmail-hadoop-pig-dev@hadoop.apache.org Received: (qmail 81278 invoked by uid 99); 14 Nov 2013 20:05:22 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Nov 2013 20:05:22 +0000 Date: Thu, 14 Nov 2013 20:05:22 +0000 (UTC) From: "Mike Peterson (JIRA)" To: pig-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (PIG-3574) ToDate() can't handle some custom time formats MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Mike Peterson created PIG-3574: ---------------------------------- Summary: ToDate() can't handle some custom time formats Key: PIG-3574 URL: https://issues.apache.org/jira/browse/PIG-3574 Project: Pig Issue Type: Bug Affects Versions: 0.11.1, 0.12.0, 0.11 Reporter: Mike Peterson When trying to parse a string with a format as follows *Fri Nov 01 12:30:19 EDT 2013* there is no way to properly escape the EDT timezone. Both SimpleDate and Joda time provide the single quote character ' to escape custom text (see the examples [here|http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html#timezone] and documentation [here|http://www.joda.org/joda-time/key_format.html], respectively). However, using this violates Pigs grammar and results in an error. This can be successfully escaped by using something like \'EDT\' and a date time will be returned. This introduces new problems, when you try something like a filter, the next line will throw an error (usually mismatched input '(' expecting SEMI_COLON). I believe this is a result of violating Pigs grammar once again. -- This message was sent by Atlassian JIRA (v6.1#6144)