Github user srowen commented on a diff in the pull request: https://github.com/apache/spark/pull/17013#discussion_r102460136 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/JavaTypeInference.scala --- @@ -131,9 +130,16 @@ object JavaTypeInference { } } + def getJavaBeanPropertiesWithGetters(beanClass: Class[_]): Array[PropertyDescriptor] = { + val beanInfo = Introspector.getBeanInfo(beanClass) + beanInfo.getPropertyDescriptors + .filterNot(_.getName == "class").filter(p => p.getReadMethod != null) + } + private def getJavaBeanProperties(beanClass: Class[_]): Array[PropertyDescriptor] = { --- End diff -- Can this call the new method above and additionally filter for a setter? The naming ends up a bit funny because the first method sounds like it returns a subset of the second method, but it's the other way around. The first one returns "readable properties"? and the second returns "read-write properties"? not sure, might be worth clarifying
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org