From user-return-34486-archive-asf-public=cust-asf.ponee.io@flink.apache.org Fri Apr 24 14:29: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 9A27B18062C for ; Fri, 24 Apr 2020 16:29:04 +0200 (CEST) Received: (qmail 1477 invoked by uid 500); 24 Apr 2020 14:29:02 -0000 Mailing-List: contact user-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list user@flink.apache.org Received: (qmail 1398 invoked by uid 99); 24 Apr 2020 14:29:02 -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, 24 Apr 2020 14:29:02 +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 EBAFDC2279 for ; Fri, 24 Apr 2020 14:29:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.199 X-Spam-Level: X-Spam-Status: No, score=0.199 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=okkam-it.20150623.gappssmtp.com Received: from mx1-ec2-va.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id cpIorCM4SXJl for ; Fri, 24 Apr 2020 14:29:00 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.160.175; helo=mail-qt1-f175.google.com; envelope-from=pompermaier@okkam.it; receiver= Received: from mail-qt1-f175.google.com (mail-qt1-f175.google.com [209.85.160.175]) by mx1-ec2-va.apache.org (ASF Mail Server at mx1-ec2-va.apache.org) with ESMTPS id 90925BB8FE for ; Fri, 24 Apr 2020 14:29:00 +0000 (UTC) Received: by mail-qt1-f175.google.com with SMTP id e17so4581007qtp.7 for ; Fri, 24 Apr 2020 07:29:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=okkam-it.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to:cc; bh=JwBMuVoNE2rFbnajKvEtuK7IV8TT/j4Vo8rHQdtqvFs=; b=c7auS386cTS7mjMTHQvIcoxDga+kgmuJ78Tctba3+3mcROCX2B+DBJz/Se7SDf57qW WN6s3/AnYcXT4uXgZWw7xgg0JJ4E+04404ya/Pbq1hoiy0qbYNJSBm9zObHxM4vw752T B/zh4j37Kei7Pq8p/4yJcS7NPo0uKTC47d2v2GK0/+9+Fd4WAZTgSKejASvVAjVc5ATh QbUBQN23oRZUz+e4VlPPJPlKqM3xiFtTZflhIfOZM/hEfixoJSVwfMprisnryLk/slB6 mk6wk0bg7yCB6NWGTixkD7Nw+5yLBPBVLtDwyzTctr6wmwJumG6ZonxaEuwsszP8qwx/ rKFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=JwBMuVoNE2rFbnajKvEtuK7IV8TT/j4Vo8rHQdtqvFs=; b=A1Fv4OcXst9DWqvC3A/d1k+iuqkikTcA65x6JQPAXILI0I9vTCvlY7FM8G1ydXRjxF lYDA+a76ieA7MzoN7dTq1HDJOhLI7tEI0uVV0ITmKuK6uS72UqS3tO7jJqXhQ7+hbF1g gQRJLarpeYwrVtCHomLUtpd/ATLYCpQ+dEuQulcl1ncjBJumi6Qv4cePKpPY7vR4DAW5 YfA05O9ZWVXhbGHmmTieJtWKzTc74Cgv/0GF5vAbz80Cut5b+wnTv6eFb1PXxUkE0fuV G+vfmk33ch1zHCzUOFZ9OEysVENgzU7yt0Fcm8QWqgJ/+jxpKQXS396gbnJEGGDFE9bs NqYA== X-Gm-Message-State: AGi0PubvX0dZjVkBidKfVwv15HgmN69PZDygrplIlKmUI2kOPXOP1RM0 1GwI7NvWhh1L3WgPjlwaxPfepohaxEJONfHsN8dhdAR449c= X-Google-Smtp-Source: APiQypI1pKWNM+ud69Qw3Y8lnENrmZnUbbsQSNzadF+d81M763MGgt8TDrnPSeYxbmxm1uwsu7gBTwVAwJUpHJ/ngWk= X-Received: by 2002:ac8:f23:: with SMTP id e32mr9804764qtk.368.1587738534044; Fri, 24 Apr 2020 07:28:54 -0700 (PDT) MIME-Version: 1.0 From: Flavio Pompermaier Date: Fri, 24 Apr 2020 16:28:43 +0200 Message-ID: Subject: JDBC error on numeric conversion (because of DecimalType MIN_PRECISION) To: user Cc: Timo Walther , Bowen Li Content-Type: multipart/alternative; boundary="000000000000518f2205a40a2f88" --000000000000518f2205a40a2f88 Content-Type: text/plain; charset="UTF-8" Hi to all, I was doing a test against Postgres and I get an error because the jdbc connect tries to create a DecimalType with precision 0 (min = 1). Should this DecimalType.MIN_PRECISION lowered to 0 or should NUMERIC type of jdbc tables mapped in some other way? The Table was created with the following statement (the test fails on creating ord_qty filed): CREATE TABLE orders( ord_no integer PRIMARY KEY, ord_date date, item_name character(35), item_grade character(1), ord_qty numeric, ord_amount numeric, CONSTRAINT unq_ordno_itname UNIQUE(ord_qty,ord_amount) ); Best, Flavio -- Flavio Pompermaier Development Department OKKAM S.r.l. Tel. +(39) 0461 041809 --000000000000518f2205a40a2f88 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi to all,=C2=A0
I was doing a test against Postgres a= nd I get an error because the jdbc connect=C2=A0tries to create a DecimalTy= pe with precision 0 (min =3D 1).
Should this DecimalType.MIN_PREC= ISION lowered to 0 or should NUMERIC type of jdbc tables mapped in some oth= er way?

The Table was created with the following s= tatement (the test fails on creating ord_qty filed):

CREATE TABLE orders(
=C2=A0 =C2=A0 ord_no integer PRIMARY KEY,
=C2= =A0 =C2=A0 ord_date date,
=C2=A0 =C2=A0 item_name character(35),
=C2= =A0 =C2=A0 item_grade character(1),
=C2=A0 =C2=A0 ord_qty numeric,
= =C2=A0 =C2=A0 ord_amount numeric,
=C2=A0 =C2=A0 CONSTRAINT unq_ordno_itn= ame UNIQUE(ord_qty,ord_amount)
);

B= est,
Flavio
--
Flavio= Pompermaier
Development Department

OKKAM S.r.l.
Tel. +(39) 04= 61 041809
--000000000000518f2205a40a2f88--