1

I am going through this and this . I clearly see the type"Dataframe" is defined for scala and not for Java. Does that mean type "Dataframe" is not technically supported but rather use Dataset[T] insetad ?

And also, from this , please share inputs about what does it mean - Does that signify the same fact Java doesnt have the construct for dataframe ?

Scala Dataset[T] & DataFrame (alias for Dataset[Row])

Java Dataset[T]

5
  • All Scala classes are visible to Java and vice versa. Have you added the spark and scala libraries to your Maven/Gradle/SBT? E.g. for Maven to your pom.xml file. Commented Jul 27, 2020 at 16:36
  • I did , i was referring to the javadoc and scaladoc and also the other question wrt DataFrame (alias for Dataset[Row]) - it is not mentioned in Java Commented Jul 27, 2020 at 16:41
  • @DannyVarod DataFrame is a type alias, not a class. Commented Jul 27, 2020 at 17:13
  • @AlexeyRomanov I know, for Dataset[Row], forgot that java can't see these though. Commented Jul 27, 2020 at 17:48
  • @Nag why not use a scala class in your code? It will still compile into your jar, however, you will be able to use all the scala "goodies" such as lambdas, implicits, typetags, spark-encoders etc. Commented Jul 27, 2020 at 17:50

1 Answer 1

1

Java has no concept of a type alias, so in Java, you would need to use

Dataset<org.apache.spark.sql.Row>

to refer to a Dataframe.

Sign up to request clarification or add additional context in comments.

1 Comment

as simple as that. thanks . so, no "DataFrame" construct in java

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.