[ 
https://issues.apache.org/jira/browse/SPARK-18492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16629231#comment-16629231
 ] 

David Spies commented on SPARK-18492:
-------------------------------------

Ran into this as well. It seems like this is happening because the "Optimized 
Logical Plan" is significantly larger than the "Parsed Logical Plan". Is there 
an "optimization" I can turn off that will keep the size down?
(Spark v. 2.1.3)


{code:java}
== Parsed Logical Plan ==
Aggregate [count(1) AS count#2296L]
+- Filter (age_imputed_fac#2247 = age_imputed_0)
   +- Project [PassengerId#2183L AS PassengerId#2226L, Survived#2184 AS 
Survived#2227, Pclass#2185 AS Pclass#2228, Sex#2186 AS Sex#2229, Age#2187 AS 
Age#2230, SibSp#2188L AS SibSp#2231L, Parch#2189L AS Parch#2232L, Ticket#2190 
AS Ticket#2233, Fare#2191 AS Fare#2234, Cabin#2192 AS Cabin#2235, Embarked#2193 
AS Embarked#2236, firstname_proc#2194 AS firstname_proc#2237, 
lastname_proc#2195 AS lastname_proc#2238, age_1_male#2196 AS age_1_male#2239, 
age_2_male#2197 AS age_2_male#2240, age_3_male#2198 AS age_3_male#2241, 
age_1_female#2199 AS age_1_female#2242, age_2_female#2200 AS age_2_female#2243, 
age_3_female#2201 AS age_3_female#2244, age_imputed#2202 AS age_imputed#2245, 
age_imputed_1#2203 AS age_imputed_1#2246, coalesce(CASE WHEN (true = 
((age_imputed#2202 >= 0.0) && (age_imputed#2202 < 16.0))) THEN age_imputed_0 
END, CASE WHEN (true = ((age_imputed#2202 >= 16.0) && (age_imputed#2202 < 
32.0))) THEN age_imputed_1 END, CASE WHEN (true = ((age_imputed#2202 >= 32.0) 
&& (age_imputed#2202 < 48.0))) THEN age_imputed_2 END, CASE WHEN (true = 
((age_imputed#2202 >= 48.0) && (age_imputed#2202 < 64.0))) THEN age_imputed_3 
END, CASE WHEN (true = ((age_imputed#2202 >= 64.0) && (age_imputed#2202 < 
81.0))) THEN age_imputed_4 END, CASE WHEN (true = isnull(age_imputed#2202)) 
THEN age_imputed_NULL END) AS age_imputed_fac#2247]
      +- Project [PassengerId#2142L AS PassengerId#2183L, Survived#2143 AS 
Survived#2184, Pclass#2144 AS Pclass#2185, Sex#2145 AS Sex#2186, Age#2146 AS 
Age#2187, SibSp#2147L AS SibSp#2188L, Parch#2148L AS Parch#2189L, Ticket#2149 
AS Ticket#2190, Fare#2150 AS Fare#2191, Cabin#2151 AS Cabin#2192, Embarked#2152 
AS Embarked#2193, firstname_proc#2153 AS firstname_proc#2194, 
lastname_proc#2154 AS lastname_proc#2195, age_1_male#2155 AS age_1_male#2196, 
age_2_male#2156 AS age_2_male#2197, age_3_male#2157 AS age_3_male#2198, 
age_1_female#2158 AS age_1_female#2199, age_2_female#2159 AS age_2_female#2200, 
age_3_female#2160 AS age_3_female#2201, age_imputed#2161 AS age_imputed#2202, 
coalesce(age_imputed#2161, 0.0) AS age_imputed_1#2203]
         +- Project [PassengerId#2103L AS PassengerId#2142L, Survived#2104 AS 
Survived#2143, Pclass#2105 AS Pclass#2144, Sex#2106 AS Sex#2145, Age#2107 AS 
Age#2146, SibSp#2108L AS SibSp#2147L, Parch#2109L AS Parch#2148L, Ticket#2110 
AS Ticket#2149, Fare#2111 AS Fare#2150, Cabin#2112 AS Cabin#2151, Embarked#2113 
AS Embarked#2152, firstname_proc#2114 AS firstname_proc#2153, 
lastname_proc#2115 AS lastname_proc#2154, age_1_male#2116 AS age_1_male#2155, 
age_2_male#2117 AS age_2_male#2156, age_3_male#2118 AS age_3_male#2157, 
age_1_female#2119 AS age_1_female#2158, age_2_female#2120 AS age_2_female#2159, 
age_3_female#2121 AS age_3_female#2160, coalesce(age_1_male#2116, 
age_2_male#2117, age_3_male#2118, age_1_female#2119, age_2_female#2120, 
age_3_female#2121, Age#2107) AS age_imputed#2161]
            +- Project [PassengerId#2076L AS PassengerId#2103L, Survived#2077 
AS Survived#2104, Pclass#2078 AS Pclass#2105, Sex#2079 AS Sex#2106, Age#2080 AS 
Age#2107, SibSp#2081L AS SibSp#2108L, Parch#2082L AS Parch#2109L, Ticket#2083 
AS Ticket#2110, Fare#2084 AS Fare#2111, Cabin#2085 AS Cabin#2112, Embarked#2086 
AS Embarked#2113, firstname_proc#2087 AS firstname_proc#2114, 
lastname_proc#2088 AS lastname_proc#2115, CASE WHEN (true = ((isnull(Age#2080) 
&& (Sex#2079 = male)) && (Pclass#2078 = 1))) THEN 39.56 END AS age_1_male#2116, 
CASE WHEN (true = ((isnull(Age#2080) && (Sex#2079 = male)) && (Pclass#2078 = 
2))) THEN 21.72 END AS age_2_male#2117, CASE WHEN (true = ((isnull(Age#2080) && 
(Sex#2079 = male)) && (Pclass#2078 = 3))) THEN 26.84 END AS age_3_male#2118, 
CASE WHEN (true = ((isnull(Age#2080) && (Sex#2079 = female)) && (Pclass#2078 = 
1))) THEN 38.84 END AS age_1_female#2119, CASE WHEN (true = ((isnull(Age#2080) 
&& (Sex#2079 = female)) && (Pclass#2078 = 2))) THEN 27.48 END AS 
age_2_female#2120, CASE WHEN (true = ((isnull(Age#2080) && (Sex#2079 = female)) 
&& (Pclass#2078 = 3))) THEN 11.16 END AS age_3_female#2121]
               +- Project [CASE WHEN (true = ((PassengerId#106L >= 1) && 
(PassengerId#106L <= 900))) THEN PassengerId#106L END AS PassengerId#2076L, 
CASE WHEN (true = ((Survived#107 >= false) && (Survived#107 <= true))) THEN 
Survived#107 END AS Survived#2077, CASE WHEN (true = Pclass#108 IN (1,2,3)) 
THEN Pclass#108 END AS Pclass#2078, CASE WHEN (true = Sex#109 IN (female,male)) 
THEN Sex#109 END AS Sex#2079, CASE WHEN (true = ((Age#110 >= cast(0 as double)) 
&& (Age#110 <= cast(80 as double)))) THEN Age#110 END AS Age#2080, CASE WHEN 
(true = ((SibSp#111L >= 0) && (SibSp#111L <= 8))) THEN SibSp#111L END AS 
SibSp#2081L, CASE WHEN (true = ((Parch#112L >= 0) && (Parch#112L <= 6))) THEN 
Parch#112L END AS Parch#2082L, Ticket#113 AS Ticket#2083, CASE WHEN (true = 
((Fare#114 >= cast(0 as double)) && (Fare#114 <= cast(520 as double)))) THEN 
Fare#114 END AS Fare#2084, Cabin#115 AS Cabin#2085, CASE WHEN (true = 
Embarked#116 IN (,C,Q,S)) THEN Embarked#116 END AS Embarked#2086, 
firstname_proc#117 AS firstname_proc#2087, lastname_proc#118 AS 
lastname_proc#2088]
                  +- Project [cast(PassengerId#0 as bigint) AS 
PassengerId#106L, Survived#1 AS Survived#107, Pclass#2 AS Pclass#108, Sex#3 AS 
Sex#109, CASE WHEN NOT isnan(Age#4) THEN Age#4 END AS Age#110, cast(SibSp#5 as 
bigint) AS SibSp#111L, cast(Parch#6 as bigint) AS Parch#112L, Ticket#7 AS 
Ticket#113, CASE WHEN NOT isnan(Fare#8) THEN Fare#8 END AS Fare#114, Cabin#9 AS 
Cabin#115, Embarked#10 AS Embarked#116, firstname_proc#11 AS 
firstname_proc#117, lastname_proc#12 AS lastname_proc#118]
                     +- Project [PassengerId#0, Survived#1, Pclass#2, Sex#3, 
Age#4, SibSp#5, Parch#6, Ticket#7, Fare#8, Cabin#9, Embarked#10, 
firstname_proc#11, lastname_proc#12]
                        +- 
Relation[PassengerId#0,Survived#1,Pclass#2,Sex#3,Age#4,SibSp#5,Parch#6,Ticket#7,Fare#8,Cabin#9,Embarked#10,firstname_proc#11,lastname_proc#12]
 parquet

== Analyzed Logical Plan ==
count: bigint
Aggregate [count(1) AS count#2296L]
+- Filter (age_imputed_fac#2247 = age_imputed_0)
   +- Project [PassengerId#2183L AS PassengerId#2226L, Survived#2184 AS 
Survived#2227, Pclass#2185 AS Pclass#2228, Sex#2186 AS Sex#2229, Age#2187 AS 
Age#2230, SibSp#2188L AS SibSp#2231L, Parch#2189L AS Parch#2232L, Ticket#2190 
AS Ticket#2233, Fare#2191 AS Fare#2234, Cabin#2192 AS Cabin#2235, Embarked#2193 
AS Embarked#2236, firstname_proc#2194 AS firstname_proc#2237, 
lastname_proc#2195 AS lastname_proc#2238, age_1_male#2196 AS age_1_male#2239, 
age_2_male#2197 AS age_2_male#2240, age_3_male#2198 AS age_3_male#2241, 
age_1_female#2199 AS age_1_female#2242, age_2_female#2200 AS age_2_female#2243, 
age_3_female#2201 AS age_3_female#2244, age_imputed#2202 AS age_imputed#2245, 
age_imputed_1#2203 AS age_imputed_1#2246, coalesce(CASE WHEN (true = 
((age_imputed#2202 >= 0.0) && (age_imputed#2202 < 16.0))) THEN age_imputed_0 
END, CASE WHEN (true = ((age_imputed#2202 >= 16.0) && (age_imputed#2202 < 
32.0))) THEN age_imputed_1 END, CASE WHEN (true = ((age_imputed#2202 >= 32.0) 
&& (age_imputed#2202 < 48.0))) THEN age_imputed_2 END, CASE WHEN (true = 
((age_imputed#2202 >= 48.0) && (age_imputed#2202 < 64.0))) THEN age_imputed_3 
END, CASE WHEN (true = ((age_imputed#2202 >= 64.0) && (age_imputed#2202 < 
81.0))) THEN age_imputed_4 END, CASE WHEN (true = isnull(age_imputed#2202)) 
THEN age_imputed_NULL END) AS age_imputed_fac#2247]
      +- Project [PassengerId#2142L AS PassengerId#2183L, Survived#2143 AS 
Survived#2184, Pclass#2144 AS Pclass#2185, Sex#2145 AS Sex#2186, Age#2146 AS 
Age#2187, SibSp#2147L AS SibSp#2188L, Parch#2148L AS Parch#2189L, Ticket#2149 
AS Ticket#2190, Fare#2150 AS Fare#2191, Cabin#2151 AS Cabin#2192, Embarked#2152 
AS Embarked#2193, firstname_proc#2153 AS firstname_proc#2194, 
lastname_proc#2154 AS lastname_proc#2195, age_1_male#2155 AS age_1_male#2196, 
age_2_male#2156 AS age_2_male#2197, age_3_male#2157 AS age_3_male#2198, 
age_1_female#2158 AS age_1_female#2199, age_2_female#2159 AS age_2_female#2200, 
age_3_female#2160 AS age_3_female#2201, age_imputed#2161 AS age_imputed#2202, 
coalesce(age_imputed#2161, 0.0) AS age_imputed_1#2203]
         +- Project [PassengerId#2103L AS PassengerId#2142L, Survived#2104 AS 
Survived#2143, Pclass#2105 AS Pclass#2144, Sex#2106 AS Sex#2145, Age#2107 AS 
Age#2146, SibSp#2108L AS SibSp#2147L, Parch#2109L AS Parch#2148L, Ticket#2110 
AS Ticket#2149, Fare#2111 AS Fare#2150, Cabin#2112 AS Cabin#2151, Embarked#2113 
AS Embarked#2152, firstname_proc#2114 AS firstname_proc#2153, 
lastname_proc#2115 AS lastname_proc#2154, age_1_male#2116 AS age_1_male#2155, 
age_2_male#2117 AS age_2_male#2156, age_3_male#2118 AS age_3_male#2157, 
age_1_female#2119 AS age_1_female#2158, age_2_female#2120 AS age_2_female#2159, 
age_3_female#2121 AS age_3_female#2160, coalesce(age_1_male#2116, 
age_2_male#2117, age_3_male#2118, age_1_female#2119, age_2_female#2120, 
age_3_female#2121, Age#2107) AS age_imputed#2161]
            +- Project [PassengerId#2076L AS PassengerId#2103L, Survived#2077 
AS Survived#2104, Pclass#2078 AS Pclass#2105, Sex#2079 AS Sex#2106, Age#2080 AS 
Age#2107, SibSp#2081L AS SibSp#2108L, Parch#2082L AS Parch#2109L, Ticket#2083 
AS Ticket#2110, Fare#2084 AS Fare#2111, Cabin#2085 AS Cabin#2112, Embarked#2086 
AS Embarked#2113, firstname_proc#2087 AS firstname_proc#2114, 
lastname_proc#2088 AS lastname_proc#2115, CASE WHEN (true = ((isnull(Age#2080) 
&& (Sex#2079 = male)) && (Pclass#2078 = 1))) THEN 39.56 END AS age_1_male#2116, 
CASE WHEN (true = ((isnull(Age#2080) && (Sex#2079 = male)) && (Pclass#2078 = 
2))) THEN 21.72 END AS age_2_male#2117, CASE WHEN (true = ((isnull(Age#2080) && 
(Sex#2079 = male)) && (Pclass#2078 = 3))) THEN 26.84 END AS age_3_male#2118, 
CASE WHEN (true = ((isnull(Age#2080) && (Sex#2079 = female)) && (Pclass#2078 = 
1))) THEN 38.84 END AS age_1_female#2119, CASE WHEN (true = ((isnull(Age#2080) 
&& (Sex#2079 = female)) && (Pclass#2078 = 2))) THEN 27.48 END AS 
age_2_female#2120, CASE WHEN (true = ((isnull(Age#2080) && (Sex#2079 = female)) 
&& (Pclass#2078 = 3))) THEN 11.16 END AS age_3_female#2121]
               +- Project [CASE WHEN (true = ((PassengerId#106L >= 1) && 
(PassengerId#106L <= 900))) THEN PassengerId#106L END AS PassengerId#2076L, 
CASE WHEN (true = ((Survived#107 >= false) && (Survived#107 <= true))) THEN 
Survived#107 END AS Survived#2077, CASE WHEN (true = Pclass#108 IN (1,2,3)) 
THEN Pclass#108 END AS Pclass#2078, CASE WHEN (true = Sex#109 IN (female,male)) 
THEN Sex#109 END AS Sex#2079, CASE WHEN (true = ((Age#110 >= cast(0 as double)) 
&& (Age#110 <= cast(80 as double)))) THEN Age#110 END AS Age#2080, CASE WHEN 
(true = ((SibSp#111L >= 0) && (SibSp#111L <= 8))) THEN SibSp#111L END AS 
SibSp#2081L, CASE WHEN (true = ((Parch#112L >= 0) && (Parch#112L <= 6))) THEN 
Parch#112L END AS Parch#2082L, Ticket#113 AS Ticket#2083, CASE WHEN (true = 
((Fare#114 >= cast(0 as double)) && (Fare#114 <= cast(520 as double)))) THEN 
Fare#114 END AS Fare#2084, Cabin#115 AS Cabin#2085, CASE WHEN (true = 
Embarked#116 IN (,C,Q,S)) THEN Embarked#116 END AS Embarked#2086, 
firstname_proc#117 AS firstname_proc#2087, lastname_proc#118 AS 
lastname_proc#2088]
                  +- Project [cast(PassengerId#0 as bigint) AS 
PassengerId#106L, Survived#1 AS Survived#107, Pclass#2 AS Pclass#108, Sex#3 AS 
Sex#109, CASE WHEN NOT isnan(Age#4) THEN Age#4 END AS Age#110, cast(SibSp#5 as 
bigint) AS SibSp#111L, cast(Parch#6 as bigint) AS Parch#112L, Ticket#7 AS 
Ticket#113, CASE WHEN NOT isnan(Fare#8) THEN Fare#8 END AS Fare#114, Cabin#9 AS 
Cabin#115, Embarked#10 AS Embarked#116, firstname_proc#11 AS 
firstname_proc#117, lastname_proc#12 AS lastname_proc#118]
                     +- Project [PassengerId#0, Survived#1, Pclass#2, Sex#3, 
Age#4, SibSp#5, Parch#6, Ticket#7, Fare#8, Cabin#9, Embarked#10, 
firstname_proc#11, lastname_proc#12]
                        +- 
Relation[PassengerId#0,Survived#1,Pclass#2,Sex#3,Age#4,SibSp#5,Parch#6,Ticket#7,Fare#8,Cabin#9,Embarked#10,firstname_proc#11,lastname_proc#12]
 parquet

== Optimized Logical Plan ==
Aggregate [count(1) AS count#2296L]
+- Project
   +- Filter (coalesce(CASE WHEN (true = ((coalesce(CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 1))) THEN 39.56 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 2))) THEN 
21.72 END, CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = male)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 3))) THEN 26.84 END, CASE WHEN 
(true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 1))) THEN 38.84 END, CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 2))) THEN 27.48 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 3))) 
THEN 11.16 END, CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) >= 0.0) && (coalesce(CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 1))) THEN 39.56 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 2))) THEN 
21.72 END, CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = male)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 3))) THEN 26.84 END, CASE WHEN 
(true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 1))) THEN 38.84 END, CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 2))) THEN 27.48 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 3))) 
THEN 11.16 END, CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) < 16.0))) THEN age_imputed_0 END, CASE 
WHEN (true = ((coalesce(CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE 
WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) 
THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) 
&& (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = male)) && (CASE 
WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 1))) THEN 39.56 END, CASE 
WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 
END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE 
WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 2))) THEN 21.72 END, CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 3))) THEN 26.84 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 1))) 
THEN 38.84 END, CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = female)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 2))) THEN 27.48 END, CASE WHEN 
(true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 3))) THEN 11.16 END, CASE WHEN (true = ((CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) >= 
16.0) && (coalesce(CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = male)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 1))) THEN 39.56 END, CASE WHEN 
(true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 2))) THEN 21.72 END, CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 3))) THEN 26.84 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 1))) 
THEN 38.84 END, CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = female)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 2))) THEN 27.48 END, CASE WHEN 
(true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 3))) THEN 11.16 END, CASE WHEN (true = ((CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) < 
32.0))) THEN age_imputed_1 END, CASE WHEN (true = ((coalesce(CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 1))) THEN 39.56 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 2))) THEN 
21.72 END, CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = male)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 3))) THEN 26.84 END, CASE WHEN 
(true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 1))) THEN 38.84 END, CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 2))) THEN 27.48 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 3))) 
THEN 11.16 END, CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) >= 32.0) && (coalesce(CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 1))) THEN 39.56 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 2))) THEN 
21.72 END, CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = male)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 3))) THEN 26.84 END, CASE WHEN 
(true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 1))) THEN 38.84 END, CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 2))) THEN 27.48 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 3))) 
THEN 11.16 END, CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) < 48.0))) THEN age_imputed_2 END, CASE 
WHEN (true = ((coalesce(CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE 
WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) 
THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) 
&& (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = male)) && (CASE 
WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 1))) THEN 39.56 END, CASE 
WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 
END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE 
WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 2))) THEN 21.72 END, CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 3))) THEN 26.84 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 1))) 
THEN 38.84 END, CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = female)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 2))) THEN 27.48 END, CASE WHEN 
(true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 3))) THEN 11.16 END, CASE WHEN (true = ((CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) >= 
48.0) && (coalesce(CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = male)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 1))) THEN 39.56 END, CASE WHEN 
(true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 2))) THEN 21.72 END, CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 3))) THEN 26.84 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 1))) 
THEN 38.84 END, CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = female)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 2))) THEN 27.48 END, CASE WHEN 
(true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 3))) THEN 11.16 END, CASE WHEN (true = ((CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) < 
64.0))) THEN age_imputed_3 END, CASE WHEN (true = ((coalesce(CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 1))) THEN 39.56 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 2))) THEN 
21.72 END, CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = male)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 3))) THEN 26.84 END, CASE WHEN 
(true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 1))) THEN 38.84 END, CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 2))) THEN 27.48 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 3))) 
THEN 11.16 END, CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) >= 64.0) && (coalesce(CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 1))) THEN 39.56 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 2))) THEN 
21.72 END, CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = male)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 3))) THEN 26.84 END, CASE WHEN 
(true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 1))) THEN 38.84 END, CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 2))) THEN 27.48 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 3))) 
THEN 11.16 END, CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) < 81.0))) THEN age_imputed_4 END, CASE 
WHEN (true = isnull(coalesce(CASE WHEN (true = ((isnull(CASE WHEN (true = 
((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 1))) THEN 
39.56 END, CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = male)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 2))) THEN 21.72 END, CASE WHEN 
(true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 3))) THEN 26.84 END, CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 1))) THEN 38.84 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 2))) 
THEN 27.48 END, CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = female)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 3))) THEN 11.16 END, CASE WHEN 
(true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END))) THEN age_imputed_NULL END) = age_imputed_0)
      +- InMemoryRelation [PassengerId#0, Survived#1, Pclass#2, Sex#3, Age#4, 
SibSp#5, Parch#6, Ticket#7, Fare#8, Cabin#9, Embarked#10, firstname_proc#11, 
lastname_proc#12], true, 10000, StorageLevel(disk, memory, deserialized, 1 
replicas)
            +- *FileScan parquet 
[PassengerId#0,Survived#1,Pclass#2,Sex#3,Age#4,SibSp#5,Parch#6,Ticket#7,Fare#8,Cabin#9,Embarked#10,firstname_proc#11,lastname_proc#12]
 Batched: true, Format: Parquet, Location: 
InMemoryFileIndex[file:/home/centos/leapyear/data/titanic_kaggle.parq], 
PartitionFilters: [], PushedFilters: [], ReadSchema: 
struct<PassengerId:int,Survived:boolean,Pclass:string,Sex:string,Age:double,SibSp:int,Parch:int,T...

== Physical Plan ==
*HashAggregate(keys=[], functions=[count(1)], output=[count#2296L])
+- Exchange SinglePartition
   +- *HashAggregate(keys=[], functions=[partial_count(1)], 
output=[count#2365L])
      +- *Project
         +- *Filter (coalesce(CASE WHEN (true = ((coalesce(CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 1))) THEN 39.56 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 2))) THEN 
21.72 END, CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = male)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 3))) THEN 26.84 END, CASE WHEN 
(true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 1))) THEN 38.84 END, CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 2))) THEN 27.48 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 3))) 
THEN 11.16 END, CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) >= 0.0) && (coalesce(CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 1))) THEN 39.56 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 2))) THEN 
21.72 END, CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = male)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 3))) THEN 26.84 END, CASE WHEN 
(true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 1))) THEN 38.84 END, CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 2))) THEN 27.48 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 3))) 
THEN 11.16 END, CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) < 16.0))) THEN age_imputed_0 END, CASE 
WHEN (true = ((coalesce(CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE 
WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) 
THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) 
&& (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = male)) && (CASE 
WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 1))) THEN 39.56 END, CASE 
WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 
END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE 
WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 2))) THEN 21.72 END, CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 3))) THEN 26.84 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 1))) 
THEN 38.84 END, CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = female)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 2))) THEN 27.48 END, CASE WHEN 
(true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 3))) THEN 11.16 END, CASE WHEN (true = ((CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) >= 
16.0) && (coalesce(CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = male)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 1))) THEN 39.56 END, CASE WHEN 
(true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 2))) THEN 21.72 END, CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 3))) THEN 26.84 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 1))) 
THEN 38.84 END, CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = female)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 2))) THEN 27.48 END, CASE WHEN 
(true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 3))) THEN 11.16 END, CASE WHEN (true = ((CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) < 
32.0))) THEN age_imputed_1 END, CASE WHEN (true = ((coalesce(CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 1))) THEN 39.56 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 2))) THEN 
21.72 END, CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = male)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 3))) THEN 26.84 END, CASE WHEN 
(true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 1))) THEN 38.84 END, CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 2))) THEN 27.48 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 3))) 
THEN 11.16 END, CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) >= 32.0) && (coalesce(CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 1))) THEN 39.56 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 2))) THEN 
21.72 END, CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = male)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 3))) THEN 26.84 END, CASE WHEN 
(true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 1))) THEN 38.84 END, CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 2))) THEN 27.48 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 3))) 
THEN 11.16 END, CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) < 48.0))) THEN age_imputed_2 END, CASE 
WHEN (true = ((coalesce(CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE 
WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) 
THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) 
&& (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = male)) && (CASE 
WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 1))) THEN 39.56 END, CASE 
WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 
END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE 
WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 2))) THEN 21.72 END, CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 3))) THEN 26.84 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 1))) 
THEN 38.84 END, CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = female)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 2))) THEN 27.48 END, CASE WHEN 
(true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 3))) THEN 11.16 END, CASE WHEN (true = ((CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) >= 
48.0) && (coalesce(CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = male)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 1))) THEN 39.56 END, CASE WHEN 
(true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 2))) THEN 21.72 END, CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 3))) THEN 26.84 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 1))) 
THEN 38.84 END, CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = female)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 2))) THEN 27.48 END, CASE WHEN 
(true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 3))) THEN 11.16 END, CASE WHEN (true = ((CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) < 
64.0))) THEN age_imputed_3 END, CASE WHEN (true = ((coalesce(CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 1))) THEN 39.56 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 2))) THEN 
21.72 END, CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = male)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 3))) THEN 26.84 END, CASE WHEN 
(true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 1))) THEN 38.84 END, CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 2))) THEN 27.48 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 3))) 
THEN 11.16 END, CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) >= 64.0) && (coalesce(CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 1))) THEN 39.56 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 2))) THEN 
21.72 END, CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = male)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 3))) THEN 26.84 END, CASE WHEN 
(true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 1))) THEN 38.84 END, CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 2))) THEN 27.48 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 3))) 
THEN 11.16 END, CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) < 81.0))) THEN age_imputed_4 END, CASE 
WHEN (true = isnull(coalesce(CASE WHEN (true = ((isnull(CASE WHEN (true = 
((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 1))) THEN 
39.56 END, CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = male)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 2))) THEN 21.72 END, CASE WHEN 
(true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 3))) THEN 26.84 END, CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 1))) THEN 38.84 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 2))) 
THEN 27.48 END, CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = female)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 3))) THEN 11.16 END, CASE WHEN 
(true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END))) THEN age_imputed_NULL END) = age_imputed_0)
            +- InMemoryTableScan [Age#4, Sex#3, Pclass#2], [(coalesce(CASE WHEN 
(true = ((coalesce(CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = male)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 1))) THEN 39.56 END, CASE WHEN 
(true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 2))) THEN 21.72 END, CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 3))) THEN 26.84 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 1))) 
THEN 38.84 END, CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = female)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 2))) THEN 27.48 END, CASE WHEN 
(true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 3))) THEN 11.16 END, CASE WHEN (true = ((CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) >= 
0.0) && (coalesce(CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = male)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 1))) THEN 39.56 END, CASE WHEN 
(true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 2))) THEN 21.72 END, CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 3))) THEN 26.84 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 1))) 
THEN 38.84 END, CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = female)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 2))) THEN 27.48 END, CASE WHEN 
(true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 3))) THEN 11.16 END, CASE WHEN (true = ((CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) < 
16.0))) THEN age_imputed_0 END, CASE WHEN (true = ((coalesce(CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 1))) THEN 39.56 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 2))) THEN 
21.72 END, CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = male)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 3))) THEN 26.84 END, CASE WHEN 
(true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 1))) THEN 38.84 END, CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 2))) THEN 27.48 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 3))) 
THEN 11.16 END, CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) >= 16.0) && (coalesce(CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 1))) THEN 39.56 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 2))) THEN 
21.72 END, CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = male)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 3))) THEN 26.84 END, CASE WHEN 
(true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 1))) THEN 38.84 END, CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 2))) THEN 27.48 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 3))) 
THEN 11.16 END, CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) < 32.0))) THEN age_imputed_1 END, CASE 
WHEN (true = ((coalesce(CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE 
WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) 
THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) 
&& (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = male)) && (CASE 
WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 1))) THEN 39.56 END, CASE 
WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 
END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE 
WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 2))) THEN 21.72 END, CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 3))) THEN 26.84 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 1))) 
THEN 38.84 END, CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = female)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 2))) THEN 27.48 END, CASE WHEN 
(true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 3))) THEN 11.16 END, CASE WHEN (true = ((CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) >= 
32.0) && (coalesce(CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = male)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 1))) THEN 39.56 END, CASE WHEN 
(true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 2))) THEN 21.72 END, CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 3))) THEN 26.84 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 1))) 
THEN 38.84 END, CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = female)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 2))) THEN 27.48 END, CASE WHEN 
(true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 3))) THEN 11.16 END, CASE WHEN (true = ((CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) < 
48.0))) THEN age_imputed_2 END, CASE WHEN (true = ((coalesce(CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 1))) THEN 39.56 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 2))) THEN 
21.72 END, CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = male)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 3))) THEN 26.84 END, CASE WHEN 
(true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 1))) THEN 38.84 END, CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 2))) THEN 27.48 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 3))) 
THEN 11.16 END, CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) >= 48.0) && (coalesce(CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 1))) THEN 39.56 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 2))) THEN 
21.72 END, CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = male)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 3))) THEN 26.84 END, CASE WHEN 
(true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 1))) THEN 38.84 END, CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 2))) THEN 27.48 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 3))) 
THEN 11.16 END, CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) < 64.0))) THEN age_imputed_3 END, CASE 
WHEN (true = ((coalesce(CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE 
WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) 
THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) 
&& (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = male)) && (CASE 
WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 1))) THEN 39.56 END, CASE 
WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 
END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE 
WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 2))) THEN 21.72 END, CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 3))) THEN 26.84 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 1))) 
THEN 38.84 END, CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = female)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 2))) THEN 27.48 END, CASE WHEN 
(true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 3))) THEN 11.16 END, CASE WHEN (true = ((CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) >= 
64.0) && (coalesce(CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = male)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 1))) THEN 39.56 END, CASE WHEN 
(true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 2))) THEN 21.72 END, CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 3))) THEN 26.84 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 1))) 
THEN 38.84 END, CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = female)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 2))) THEN 27.48 END, CASE WHEN 
(true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 3))) THEN 11.16 END, CASE WHEN (true = ((CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) < 
81.0))) THEN age_imputed_4 END, CASE WHEN (true = isnull(coalesce(CASE WHEN 
(true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 1))) THEN 39.56 END, CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 2))) THEN 21.72 END, CASE WHEN (true = ((isnull(CASE WHEN (true 
= ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN 
Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = 
male)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 3))) THEN 
26.84 END, CASE WHEN (true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END) && (CASE 
WHEN (true = Sex#3 IN (female,male)) THEN Sex#3 END = female)) && (CASE WHEN 
(true = Pclass#2 IN (1,2,3)) THEN Pclass#2 END = 1))) THEN 38.84 END, CASE WHEN 
(true = ((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END 
>= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN 
NOT isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN 
(female,male)) THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN 
(1,2,3)) THEN Pclass#2 END = 2))) THEN 27.48 END, CASE WHEN (true = 
((isnull(CASE WHEN (true = ((CASE WHEN NOT isnan(Age#4) THEN Age#4 END >= 0.0) 
&& (CASE WHEN NOT isnan(Age#4) THEN Age#4 END <= 80.0))) THEN CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END END) && (CASE WHEN (true = Sex#3 IN (female,male)) 
THEN Sex#3 END = female)) && (CASE WHEN (true = Pclass#2 IN (1,2,3)) THEN 
Pclass#2 END = 3))) THEN 11.16 END, CASE WHEN (true = ((CASE WHEN NOT 
isnan(Age#4) THEN Age#4 END >= 0.0) && (CASE WHEN NOT isnan(Age#4) THEN Age#4 
END <= 80.0))) THEN CASE WHEN NOT isnan(Age#4) THEN Age#4 END END))) THEN 
age_imputed_NULL END) = age_imputed_0)]
                  +- InMemoryRelation [PassengerId#0, Survived#1, Pclass#2, 
Sex#3, Age#4, SibSp#5, Parch#6, Ticket#7, Fare#8, Cabin#9, Embarked#10, 
firstname_proc#11, lastname_proc#12], true, 10000, StorageLevel(disk, memory, 
deserialized, 1 replicas)
                        +- *FileScan parquet 
[PassengerId#0,Survived#1,Pclass#2,Sex#3,Age#4,SibSp#5,Parch#6,Ticket#7,Fare#8,Cabin#9,Embarked#10,firstname_proc#11,lastname_proc#12]
 Batched: true, Format: Parquet, Location: 
InMemoryFileIndex[file:/home/centos/leapyear/data/titanic_kaggle.parq], 
PartitionFilters: [], PushedFilters: [], ReadSchema: 
struct<PassengerId:int,Survived:boolean,Pclass:string,Sex:string,Age:double,SibSp:int,Parch:int,T...

{code}

> GeneratedIterator grows beyond 64 KB
> ------------------------------------
>
>                 Key: SPARK-18492
>                 URL: https://issues.apache.org/jira/browse/SPARK-18492
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.0.1
>         Environment: CentOS release 6.7 (Final)
>            Reporter: Norris Merritt
>            Priority: Major
>         Attachments: Screenshot from 2018-03-02 12-57-51.png
>
>
> spark-submit fails with ERROR CodeGenerator: failed to compile: 
> org.codehaus.janino.JaninoRuntimeException: Code of method 
> "(I[Lscala/collection/Iterator;)V" of class 
> "org.apache.spark.sql.catalyst.expressions.GeneratedClass$GeneratedIterator" 
> grows beyond 64 KB
> Error message is followed by a huge dump of generated source code.
> The generated code declares 1,454 field sequences like the following:
> /* 036 */   private org.apache.spark.sql.catalyst.expressions.ScalaUDF 
> project_scalaUDF1;
> /* 037 */   private scala.Function1 project_catalystConverter1;
> /* 038 */   private scala.Function1 project_converter1;
> /* 039 */   private scala.Function1 project_converter2;
> /* 040 */   private scala.Function2 project_udf1;
>  .... (many omitted lines) ...
> /* 6089 */   private org.apache.spark.sql.catalyst.expressions.ScalaUDF 
> project_scalaUDF1454;
> /* 6090 */   private scala.Function1 project_catalystConverter1454;
> /* 6091 */   private scala.Function1 project_converter1695;
> /* 6092 */   private scala.Function1 project_udf1454;
> It then proceeds to emit code for several methods (init, processNext) each of 
> which has totally repetitive sequences of statements pertaining to each of 
> the sequences of variables declared in the class.  For example:
> /* 6101 */   public void init(int index, scala.collection.Iterator inputs[]) {
> The reason that the 64KB JVM limit for code for a method is exceeded is 
> because the code generator is using an incredibly naive strategy.  It emits a 
> sequence like the one shown below for each of the 1,454 groups of variables 
> shown above, in 
> /* 6132 */     this.project_udf = 
> (scala.Function1)project_scalaUDF.userDefinedFunc();
> /* 6133 */     this.project_scalaUDF1 = 
> (org.apache.spark.sql.catalyst.expressions.ScalaUDF) references[10];
> /* 6134 */     this.project_catalystConverter1 = 
> (scala.Function1)org.apache.spark.sql.catalyst.CatalystTypeConverters$.MODULE$.createToCatalystConverter(project_scalaUDF1.dataType());
> /* 6135 */     this.project_converter1 = 
> (scala.Function1)org.apache.spark.sql.catalyst.CatalystTypeConverters$.MODULE$.createToScalaConverter(((org.apache.spark.sql.catalyst.expressions.Expression)(((org.apache.spark.sql.catalyst.expressions.ScalaUDF)references[10]).getChildren().apply(0))).dataType());
> /* 6136 */     this.project_converter2 = 
> (scala.Function1)org.apache.spark.sql.catalyst.CatalystTypeConverters$.MODULE$.createToScalaConverter(((org.apache.spark.sql.catalyst.expressions.Expression)(((org.apache.spark.sql.catalyst.expressions.ScalaUDF)references[10]).getChildren().apply(1))).dataType());
> It blows up after emitting 230 such sequences, while trying to emit the 231st:
> /* 7282 */     this.project_udf230 = 
> (scala.Function2)project_scalaUDF230.userDefinedFunc();
> /* 7283 */     this.project_scalaUDF231 = 
> (org.apache.spark.sql.catalyst.expressions.ScalaUDF) references[240];
> /* 7284 */     this.project_catalystConverter231 = 
> (scala.Function1)org.apache.spark.sql.catalyst.CatalystTypeConverters$.MODULE$.createToCatalystConverter(project_scalaUDF231.dataType());
>  .... many omitted lines ...
>  Example of repetitive code sequences emitted for processNext method:
> /* 12253 */       boolean project_isNull247 = project_result244 == null;
> /* 12254 */       MapData project_value247 = null;
> /* 12255 */       if (!project_isNull247) {
> /* 12256 */         project_value247 = project_result244;
> /* 12257 */       }
> /* 12258 */       Object project_arg = sort_isNull5 ? null : 
> project_converter489.apply(sort_value5);
> /* 12259 */
> /* 12260 */       ArrayData project_result249 = null;
> /* 12261 */       try {
> /* 12262 */         project_result249 = 
> (ArrayData)project_catalystConverter248.apply(project_udf248.apply(project_arg));
> /* 12263 */       } catch (Exception e) {
> /* 12264 */         throw new 
> org.apache.spark.SparkException(project_scalaUDF248.udfErrorMessage(), e);
> /* 12265 */       }
> /* 12266 */
> /* 12267 */       boolean project_isNull252 = project_result249 == null;
> /* 12268 */       ArrayData project_value252 = null;
> /* 12269 */       if (!project_isNull252) {
> /* 12270 */         project_value252 = project_result249;
> /* 12271 */       }
> /* 12272 */       Object project_arg1 = project_isNull252 ? null : 
> project_converter488.apply(project_value252);
> /* 12273 */
> /* 12274 */       ArrayData project_result248 = null;
> /* 12275 */       try {
> /* 12276 */         project_result248 = 
> (ArrayData)project_catalystConverter247.apply(project_udf247.apply(project_arg1));
> /* 12277 */       } catch (Exception e) {
> /* 12278 */         throw new 
> org.apache.spark.SparkException(project_scalaUDF247.udfErrorMessage(), e);
> /* 12279 */       }
> /* 12280 */
> /* 12281 */       boolean project_isNull251 = project_result248 == null;
> /* 12282 */       ArrayData project_value251 = null;
> /* 12283 */       if (!project_isNull251) {
> /* 12284 */         project_value251 = project_result248;
> /* 12285 */       }
> /* 12286 */       Object project_arg2 = project_isNull251 ? null : 
> project_converter487.apply(project_value251);
> /* 12287 */
> /* 12288 */       InternalRow project_result247 = null;
> /* 12289 */       try {
> /* 12290 */         project_result247 = 
> (InternalRow)project_catalystConverter246.apply(project_udf246.apply(project_arg2));
> /* 12291 */       } catch (Exception e) {
> /* 12292 */         throw new 
> org.apache.spark.SparkException(project_scalaUDF246.udfErrorMessage(), e);
> /* 12293 */       }
> /* 12294 */
> /* 12295 */       boolean project_isNull250 = project_result247 == null;
> /* 12296 */       InternalRow project_value250 = null;
> /* 12297 */       if (!project_isNull250) {
> /* 12298 */         project_value250 = project_result247;
> /* 12299 */       }
> /* 12300 */       Object project_arg3 = project_isNull250 ? null : 
> project_converter486.apply(project_value250);
> /* 12301 */
> /* 12302 */       InternalRow project_result246 = null;
> /* 12303 */       try {
> /* 12304 */         project_result246 = 
> (InternalRow)project_catalystConverter245.apply(project_udf245.apply(project_arg3));
> /* 12305 */       } catch (Exception e) {
> /* 12306 */         throw new 
> org.apache.spark.SparkException(project_scalaUDF245.udfErrorMessage(), e);
> /* 12307 */       }
> /* 12308 */
> It is pretty clear that the code generation strategy is naive. The code 
> generator should use arrays and loops instead of emitting all these 
> repetitive code sequences which only differ by a few numerical digits used to 
> generate the name of the variables.



--
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

Reply via email to