From dev-return-55144-archive-asf-public=cust-asf.ponee.io@phoenix.apache.org Fri Jan 18 23:32:05 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 [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 67AF1180647 for ; Fri, 18 Jan 2019 23:32:05 +0100 (CET) Received: (qmail 23870 invoked by uid 500); 18 Jan 2019 22:32:04 -0000 Mailing-List: contact dev-help@phoenix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@phoenix.apache.org Delivered-To: mailing list dev@phoenix.apache.org Received: (qmail 23859 invoked by uid 99); 18 Jan 2019 22:32:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Jan 2019 22:32:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 0D3F8C2828 for ; Fri, 18 Jan 2019 22:32:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.301 X-Spam-Level: X-Spam-Status: No, score=-110.301 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id QpgXiP8XmN8d for ; Fri, 18 Jan 2019 22:32:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 047406112A for ; Fri, 18 Jan 2019 22:32:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id AA956E269D for ; Fri, 18 Jan 2019 22:32:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 9EFEA25682 for ; Fri, 18 Jan 2019 22:32:00 +0000 (UTC) Date: Fri, 18 Jan 2019 22:32:00 +0000 (UTC) From: "Thomas D'Silva (JIRA)" To: dev@phoenix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (PHOENIX-2757) Phoenix Can't Coerce String to Boolean MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/PHOENIX-2757?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thomas D'Silva updated PHOENIX-2757: ------------------------------------ Fix Version/s: (was: 4.15.0) > Phoenix Can't Coerce String to Boolean > -------------------------------------- > > Key: PHOENIX-2757 > URL: https://issues.apache.org/jira/browse/PHOENIX-2757 > Project: Phoenix > Issue Type: Bug > Affects Versions: 4.6.0 > Reporter: Aaron Stephens > Priority: Major > > In the process of trying to UPSERT rows with Phoenix via Nifi, I've run into the following: > {noformat} > org.apache.phoenix.schema.ConstraintViolationException: org.apache.phoenix.schema.TypeMismatchException: ERROR 203 (22005): Type mismatch. VARCHAR cannot be coerced to BOOLEAN > at org.apache.phoenix.schema.types.PDataType.throwConstraintViolationException(PDataType.java:282) ~[na:na] > at org.apache.phoenix.schema.types.PBoolean.toObject(PBoolean.java:136) ~[na:na] > at org.apache.phoenix.jdbc.PhoenixPreparedStatement.setObject(PhoenixPreparedStatement.java:442) ~[na:na] > at org.apache.commons.dbcp.DelegatingPreparedStatement.setObject(DelegatingPreparedStatement.java:166) ~[na:na] > at org.apache.commons.dbcp.DelegatingPreparedStatement.setObject(DelegatingPreparedStatement.java:166) ~[na:na] > at org.apache.nifi.processors.standard.PutSQL.setParameter(PutSQL.java:728) ~[na:na] > at org.apache.nifi.processors.standard.PutSQL.setParameters(PutSQL.java:606) ~[na:na] > at org.apache.nifi.processors.standard.PutSQL.onTrigger(PutSQL.java:223) ~[na:na] > at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27) ~[nifi-api-0.4.1.jar:0.4.1] > at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1146) ~[nifi-framework-core-0.4.1.jar:0.4.1] > at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:139) [nifi-framework-core-0.4.1.jar:0.4.1] > at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:49) [nifi-framework-core-0.4.1.jar:0.4.1] > at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:119) [nifi-framework-core-0.4.1.jar:0.4.1] > at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_79] > at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304) [na:1.7.0_79] > at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178) [na:1.7.0_79] > at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [na:1.7.0_79] > at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_79] > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_79] > at java.lang.Thread.run(Thread.java:745) [na:1.7.0_79] > Caused by: org.apache.phoenix.schema.TypeMismatchException: ERROR 203 (22005): Type mismatch. VARCHAR cannot be coerced to BOOLEAN > at org.apache.phoenix.exception.SQLExceptionCode$1.newException(SQLExceptionCode.java:71) ~[na:na] > at org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:145) ~[na:na] > ... 20 common frames omitted > {noformat} > It appears that Phoenix currently does not know how to coerce a String into a Boolean (see [here|https://github.com/apache/phoenix/blob/master/phoenix-core/src/main/java/org/apache/phoenix/schema/types/PBoolean.java#L124-L137]). This is a feature that's present in other drivers such as PostgreSQL. -- This message was sent by Atlassian JIRA (v7.6.3#76005)