From issues-return-92592-archive-asf-public=cust-asf.ponee.io@nifi.apache.org Fri Feb 21 16:38:04 2020 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 82348180677 for ; Fri, 21 Feb 2020 17:38:03 +0100 (CET) Received: (qmail 88842 invoked by uid 500); 21 Feb 2020 16:38:02 -0000 Mailing-List: contact issues-help@nifi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nifi.apache.org Delivered-To: mailing list issues@nifi.apache.org Received: (qmail 88815 invoked by uid 99); 21 Feb 2020 16:38:02 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Feb 2020 16:38:02 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 52634E29AA for ; Fri, 21 Feb 2020 16:38:02 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id B439D7808FB for ; Fri, 21 Feb 2020 16:38:00 +0000 (UTC) Date: Fri, 21 Feb 2020 16:38:00 +0000 (UTC) From: "Eduardo Mota Fontes (Jira)" To: issues@nifi.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (NIFI-6293) MongoDB Aggregation does not parse dates MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/NIFI-6293?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:all-tabpanel ] Eduardo Mota Fontes updated NIFI-6293: -------------------------------------- Affects Version/s: (was: 1.9.2) > MongoDB Aggregation does not parse dates > ---------------------------------------- > > Key: NIFI-6293 > URL: https://issues.apache.org/jira/browse/NIFI-6293 > Project: Apache NiFi > Issue Type: Improvement > Components: Extensions > Environment: Ubuntu 16.04, MongoDB 4.0.3, TLS to MongoDB. > Reporter: Emil Sarkissian > Assignee: Eduardo Mota Fontes > Priority: Major > Labels: easyfix, newbie > Time Spent: 1h 10m > Remaining Estimate: 0h > > *Repro Steps*: > # Create a "Generate Flow File" Processor to kick off things > # Connect that to a Nifi MongoDB Aggregation Processor > # Set the query to a $match with date criteria, for example: > {code:java} > [ { "$match": { "someDate": { "$gt": "2019-01-01T00:00:00Z" } } } ]{code} > =C2=A0 > *Expected Result*: Query returns correct documents per the date criteria. > *Actual Result*: Condition always evaluates to false and no documents are= returned. > *Notes:* > # I have tried every possible way to make this work, including \{ "$date= ": "2019-01-01T00:00:00Z" } and also using "$expr" with Mongo, as well as "= $dateFromString", and "$convert". > # Using an "$expr" seems to work functionally but refuses to use any ind= exes - probably a MongoDB issue (4.0.3 is what I run) and introduces unnece= ssary complexity. > I have fixed this for our fork, as we need to go to Production soon, but = I am new to the contribution process and didn't want to just put a feature = branch without explaining the issue. > The fix is to provide a Jackson custom deserializer to handle dates based= on what Date Format is specified on the processor. -- This message was sent by Atlassian Jira (v8.3.4#803005)