Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-19729

Strange behaviour with reading csv with schema into dataframe

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete CommentsDelete
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • 2.0.1
    • None
    • Java API, SQL
    • None

    Description

      I have the following schema
      [

      {first,string_type,false}

      ,

      {second,string_type,false}

      ,

      {third,string_type,false}

      ,

      {fourth,string_type,false}

      ]

      Example lines:
      var1,var2,,

      when accessing the row I get the following
      row.size =4
      row.fieldIndex(third_string)=2
      row.getAs(third_string)=var2
      row.get(2)=var2
      print(row)= var1,var2

      Any idea why the null values are missing?

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned Assign to me
            mazenmelouk Mazen Melouk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment