[jira] [Comment Edited] (SPARK-26994) Enhance StructField to accept number format or date format
[ https://issues.apache.org/jira/browse/SPARK-26994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16783425#comment-16783425 ] Murali Aakula edited comment on SPARK-26994 at 3/4/19 2:39 PM: --- We could have defined that format conversion in the setter methods. There are multiple alternatives to solve our problem. I'm sure that everyone may have implemented in one or the other alternatives. Also, there will be performance issues while converting form Raw to User defined object (mentioned in the spark documentation). So I thought that, it will actually make sense, if the parsers/readers (Json, CSV, ..) can handle this conversion. StructField just holds the values(patterns) just like column name and the column datatype. The conversion logic will be in the parsers/readers. Hope this makesense. Please reopen this enhancement If you agree with me. Thanks. was (Author: maakula): We could have defined that format conversion in the setter methods. There are multiple alternatives to solve our problem. I'm sure that everyone may have implemented in one or the other alternatives. Also, there will be performance issues while converting form Raw to User defined object (mentioned in the spark documentation). So I thought that, it will actually make sense, if the parsers/readers (Json, CSV, ..) can handle this conversion. StructField just holds the values(patterns) just like column name and the column datatype. The conversion logic will be in the parsers/readers. Hope this makesense. > Enhance StructField to accept number format or date format > -- > > Key: SPARK-26994 > URL: https://issues.apache.org/jira/browse/SPARK-26994 > Project: Spark > Issue Type: Improvement > Components: SQL >Affects Versions: 2.4.0 >Reporter: Murali Aakula >Priority: Major > > Enhance StructField to accept number format or date format and Enahcne > reader/steramreader and writer/streamwriter to use these formats. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org
[jira] [Commented] (SPARK-26994) Enhance StructField to accept number format or date format
[ https://issues.apache.org/jira/browse/SPARK-26994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16783425#comment-16783425 ] Murali Aakula commented on SPARK-26994: --- We could have defined that format conversion in the setter methods. There are multiple alternatives to solve our problem. I'm sure that everyone may have implemented in one or the other alternatives. Also, there will be performance issues while converting form Raw to User defined object (mentioned in the spark documentation). So I thought that, it will actually make sense, if the parsers/readers (Json, CSV, ..) can handle this conversion. StructField just holds the values(patterns) just like column name and the column datatype. The conversion logic will be in the parsers/readers. Hope this makesense. > Enhance StructField to accept number format or date format > -- > > Key: SPARK-26994 > URL: https://issues.apache.org/jira/browse/SPARK-26994 > Project: Spark > Issue Type: Improvement > Components: SQL >Affects Versions: 2.4.0 >Reporter: Murali Aakula >Priority: Major > > Enhance StructField to accept number format or date format and Enahcne > reader/steramreader and writer/streamwriter to use these formats. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org
[jira] [Commented] (SPARK-26994) Enhance StructField to accept number format or date format
[ https://issues.apache.org/jira/browse/SPARK-26994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16780572#comment-16780572 ] Murali Aakula commented on SPARK-26994: --- Sample Input: id,cpt,schedule_date,dstamp,weight,miles 1,MON-14:30,2018-11-30 10:00,29/11/2018 21:07:47,"10,110.12","1,010.12" 2,MON-14:30,2018-11-30 11:00,29/11/2018 21:17:47,"1,110.12","10.10" Currently, we are reading few columns as string(schedule_date, dstamp, weight, miles) then converting them using spark sql functions as needed(date, date, double, double). Kind of Two step process. We can set one date and one timestamp format on spark config, but not multiple. > Enhance StructField to accept number format or date format > -- > > Key: SPARK-26994 > URL: https://issues.apache.org/jira/browse/SPARK-26994 > Project: Spark > Issue Type: Improvement > Components: Spark Core, SQL >Affects Versions: 2.4.0 >Reporter: Murali Aakula >Priority: Major > > Enhance StructField to accept number format or date format and Enahcne > reader/steramreader and writer/streamwriter to use these formats. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org
[jira] [Created] (SPARK-26994) Enhance StructField to accept number format or date format
Murali Aakula created SPARK-26994: - Summary: Enhance StructField to accept number format or date format Key: SPARK-26994 URL: https://issues.apache.org/jira/browse/SPARK-26994 Project: Spark Issue Type: Improvement Components: Spark Core, SQL Affects Versions: 2.4.0 Reporter: Murali Aakula Enhance StructField to accept number format or date format and Enahcne reader/steramreader and writer/streamwriter to use these formats. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org