notebook.fieldsHandlersProcessor.register(
// replacing all byte array variables with lists
extension = FieldHandlerFactory.createUpdateHandler<ByteArray>(TypeDetection.COMPILE_TIME) { _, prop ->
execute("${prop.name}.toList()").name
},
)
Cell 2:
%use dataframe
val x = ByteArray(1)
Cell 3:
x.javaClass
Expected output:
class java.util.Collections$SingletonList (that means that the byte array was transformed into a list as we asked it to in the fieldsHandlersProcessor).
You can also get this output by commenting out %use dataframe, restarting the kernel and rerunning the notebook.
Steps to reproduce
Cell 1:
Cell 2:
Cell 3:
Expected output:
class java.util.Collections$SingletonList
(that means that the byte array was transformed into a list as we asked it to in the fieldsHandlersProcessor). You can also get this output by commenting out%use dataframe
, restarting the kernel and rerunning the notebook.Actual output:
class [B
(the byte array stayed byte array).