From commits-return-13325-archive-asf-public=cust-asf.ponee.io@hudi.apache.org Fri Mar 13 11:05:02 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 C71DF180663 for ; Fri, 13 Mar 2020 12:05:01 +0100 (CET) Received: (qmail 25570 invoked by uid 500); 13 Mar 2020 11:05:01 -0000 Mailing-List: contact commits-help@hudi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hudi.apache.org Delivered-To: mailing list commits@hudi.apache.org Received: (qmail 25552 invoked by uid 99); 13 Mar 2020 11:05:01 -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, 13 Mar 2020 11:05:01 +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 9BC54E2E0C for ; Fri, 13 Mar 2020 11:05:00 +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 1CF477808F0 for ; Fri, 13 Mar 2020 11:05:00 +0000 (UTC) Date: Fri, 13 Mar 2020 11:05:00 +0000 (UTC) From: "Cosmin Iordache (Jira)" To: commits@hudi.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HUDI-83) Support for timestamp datatype in Hudi 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/HUDI-83?page=3Dcom.atlassian.ji= ra.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1705863= 5#comment-17058635 ]=20 Cosmin Iordache commented on HUDI-83: ------------------------------------- I was looking at how hudi saves data with spark-2.4.4 and things have chang= ed.=C2=A0 Decimal types are saved correctly ,timestamp as well.=C2=A0 Example of timestamp inferred column being read after saved with hoodie := =C2=A0 {code:java} scala> val q3 =3D spark.read.format("org.apache.hudi").load("hdfs://namenod= e:8020/data/lake/d3325f10-4a91-4b19-872b-5be019c4836a/converted/*/*") 5651992 [main] WARN org.apache.hudi.DefaultSource - Snapshot view not sup= ported yet via data source, for MERGE_ON_READ tables. Please query the Hive= table registered using Spark SQL. q3: org.apache.spark.sql.DataFrame =3D [_hoodie_commit_time: string, _hoodi= e_commit_seqno: string ... 13 more fields]scala> q3.show() scala> q3.select("other_date","timestamp_1").show +-------------------+-------------------+ | other_date| timestamp_1| +-------------------+-------------------+ |2017-09-17 00:00:00|2017-01-01 00:00:00| |2017-09-16 00:00:00|2017-01-01 00:00:00| +-------------------+-------------------+ scala> q3.select("other_date","timestamp_1").dtypes res6: Array[(String, String)] =3D Array((other_date,TimestampType), (timest= amp_1,TimestampType)) {code} =C2=A0And for Decimal: {code:java} scala> val q2 =3D spark.read.format("org.apache.hudi").load("hdfs://namenod= e:8020/data/lake/5a3d9896-b331-4b5d-8638-5d72e02edd34/converted/*/*") 6221463 [main] WARN org.apache.hudi.DefaultSource - Snapshot view not sup= ported yet via data source, for MERGE_ON_READ tables. Please query the Hive= table registered using Spark SQL. q2: org.apache.spark.sql.DataFrame =3D [_hoodie_commit_time: string, _hoodi= e_commit_seqno: string ... 40 more fields] scala> q2.select("LIMIT_BAL").show() +---------+ |LIMIT_BAL| +---------+ | 260000| | 110000| | 50000| .... scala> q2.select("LIMIT_BAL").dtypes res10: Array[(String, String)] =3D Array((LIMIT_BAL,DecimalType(6,0))) {code} This introduces a backwards compatibility issue though .=C2=A0 > Support for timestamp datatype in Hudi > -------------------------------------- > > Key: HUDI-83 > URL: https://issues.apache.org/jira/browse/HUDI-83 > Project: Apache Hudi (incubating) > Issue Type: Bug > Components: Usability > Reporter: Vinoth Chandar > Priority: Major > Fix For: 0.6.0 > > > [https://github.com/apache/incubator-hudi/issues/543]=C2=A0& related issu= es=C2=A0 -- This message was sent by Atlassian Jira (v8.3.4#803005)