java - Apache-spark dataframe column names are inconsistent, why does this happen? -


doing similar sql-programming-guid on apache-spark site, columns produced java bean class don't match in case sensitivity. start first letter capitalized , others don't no consistency or pattern.

there things have done different guide is:

  • private members named "mname", rather "name" , getter/setter getname setname.
  • datatypes use integer, string , timestamp.

so,

  1. by reflection, how getting names? use get/set function names , truncate off , set parts?
  2. is there way disable case sensitivity?

as why i'm not showing of code. it's work, want avoid showing shouldn't.

--update-------------------------

so looks name based on , set functions. changing set/getstarttime set/getstarttimee resulted in starttime becoming starttimee. still case have column itrn get/setitrn keeps it's upper case first letter column starttime doesn't.

--update #2-------------------------

after playing around names, looks deciding factor if spark thinks name acronym(all caps), word, or single letter. if starts word or single letter, it'll make lower case. workaround started "_". anyway... if knows how disable case sensitivity when querying, let me know.

based on i've thrown @ it, names first letters capitalized become lower case if isn't followed another upper case letter. mmark stays mmark, while mark turns mark result. i'm guessing account camel case when creating get/set methods person wanting have variable of 'name' writes setname , getname way improve readability camel case.


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -