GitHub user kevinyu98 opened a pull request: https://github.com/apache/spark/pull/11184
[SPARK-10777] [SQL]avoid checking nullability for complex data type for typeSuffix code path Hello: When we call the typeSuffix method, it will call the dataType and get the LongType for the suffix("L"). But in the complex data type(like CreatArray) cases, the dataType will also evaluate the children's nullability, which is not necessary for the typeSuffix. For the proposed fix, I will create a prettyDataType, in parallel to the dataType in the expression. At the base, it defaults to the dataType. It is only used by typeSuffix in the NameExpression for now. So the main changes is at the typeSuffix in the NameExpression, and the complexTypeCreator. The rest of files just override the prettyDataType from the abstract class Expression when their "dataType" method relies on other expression's "dataType" Then for those complex types, the "prettyDataType" does not try to evaluate the "nullable" but just pass a default that will not be used at all by the caller, "typeSuffix". You can merge this pull request into a Git repository by running: $ git pull https://github.com/kevinyu98/spark working_on_spark-13253 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/11184.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #11184 ---- commit dd82428191f8a312ec29f471a4230fa91212eadd Author: Kevin Yu <q...@us.ibm.com> Date: 2016-02-12T18:22:02Z avoid checking nullability for complex data type ---- --- 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