Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jupyter integration conflicts with variable type converters from other integrations. #640

Closed
ark-1 opened this issue Apr 2, 2024 · 1 comment · Fixed by #641
Closed
Assignees
Labels
bug Something isn't working

Comments

@ark-1
Copy link
Contributor

ark-1 commented Apr 2, 2024

Steps to reproduce

Cell 1:

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.

Actual output:

class [B (the byte array stayed byte array).

@ark-1 ark-1 added the bug Something isn't working label Apr 2, 2024
@ark-1 ark-1 self-assigned this Apr 2, 2024
ark-1 added a commit that referenced this issue Apr 2, 2024
ark-1 added a commit that referenced this issue Apr 2, 2024
@Jolanrensen
Copy link
Collaborator

probably related to #401

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants