@@ -97,6 +97,11 @@ class FunctionCallTransformer(
97
97
98
98
private interface CallTransformer {
99
99
fun interceptOrNull (callInfo : CallInfo , symbol : FirNamedFunctionSymbol , hash : String ): CallReturnType ?
100
+
101
+ /* *
102
+ * must still generate let with declared class from interceptOrNull when interpretation fails.
103
+ * it should only return null if later some frontend checker fails compilation in general
104
+ */
100
105
fun transformOrNull (call : FirFunctionCall , originalSymbol : FirNamedFunctionSymbol ): FirFunctionCall ?
101
106
}
102
107
@@ -180,7 +185,7 @@ class FunctionCallTransformer(
180
185
val (tokens, dataFrameSchema) = callResult ? : return null
181
186
val token = tokens[0 ]
182
187
val firstSchema = token.toClassSymbol(session)?.resolvedSuperTypes?.get(0 )!! .toRegularClassSymbol(session)?.fir!!
183
- val dataSchemaApis = materialize(dataFrameSchema, call, firstSchema)
188
+ val dataSchemaApis = materialize(dataFrameSchema ? : PluginDataFrameSchema . EMPTY , call, firstSchema)
184
189
185
190
val tokenFir = token.toClassSymbol(session)!! .fir
186
191
tokenFir.callShapeData = CallShapeData .RefinedType (dataSchemaApis.map { it.scope.symbol })
@@ -228,8 +233,13 @@ class FunctionCallTransformer(
228
233
val keyMarker = rootMarkers[0 ]
229
234
val groupMarker = rootMarkers[1 ]
230
235
231
- val keySchema = createPluginDataFrameSchema(groupBy.keys, groupBy.moveToTop)
232
- val groupSchema = PluginDataFrameSchema (groupBy.df.columns())
236
+ val (keySchema, groupSchema) = if (groupBy != null ) {
237
+ val keySchema = createPluginDataFrameSchema(groupBy.keys, groupBy.moveToTop)
238
+ val groupSchema = PluginDataFrameSchema (groupBy.df.columns())
239
+ keySchema to groupSchema
240
+ } else {
241
+ PluginDataFrameSchema .EMPTY to PluginDataFrameSchema .EMPTY
242
+ }
233
243
234
244
val firstSchema = keyMarker.toClassSymbol(session)?.resolvedSuperTypes?.get(0 )!! .toRegularClassSymbol(session)?.fir!!
235
245
val firstSchema1 = groupMarker.toClassSymbol(session)?.resolvedSuperTypes?.get(0 )!! .toRegularClassSymbol(session)?.fir!!
0 commit comments