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

Runtime error when using a List in a case class #8

Closed
erwan opened this issue Jun 7, 2023 · 3 comments
Closed

Runtime error when using a List in a case class #8

erwan opened this issue Jun 7, 2023 · 3 comments

Comments

@erwan
Copy link

erwan commented Jun 7, 2023

I'm trying to use List in my model, however when I do that I have runtime exception during my tests. It seems like I end up with a broken model, with a List that throws whatever I do with it. I'm getting a java.util.NoSuchElementException: head of empty list exception from inside the Scala standard lib, so it's neither empty nor containing valid values.

I created a repro as a new test in this branch: erwan@2d339dc

Is there anything I should do differently here? Or maybe that would be a bug in the library?

(migrated from findify/flink-adt#71 as the same issue is present in this new lib)

@novakov-alexey
Copy link
Collaborator

novakov-alexey commented Jun 8, 2023

Hi @erwan,

Thanks for the test!

Can you try to use this:

import org.apache.flink.api._

instead of this

import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment
import org.apache.flink.streaming.api.datastream.DataStream

?

@erwan
Copy link
Author

erwan commented Jun 8, 2023

That worked, thank you!

@erwan erwan closed this as completed Jun 8, 2023
@novakov-alexey
Copy link
Collaborator

Ok, great. I think we need pull Migration section in the readme file to the top. It shows these imports to be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants