Skip to content

Commit 7fd77be

Browse files
committed
make render in jupyter use show instead
1 parent e05feac commit 7fd77be

File tree

1 file changed

+17
-13
lines changed
  • jupyter/src/main/kotlin/org/jetbrains/kotlinx/spark/api/jupyter

1 file changed

+17
-13
lines changed

jupyter/src/main/kotlin/org/jetbrains/kotlinx/spark/api/jupyter/Integration.kt

+17-13
Original file line numberDiff line numberDiff line change
@@ -240,19 +240,23 @@ abstract class Integration(private val notebook: Notebook, private val options:
240240

241241
private fun renderDataset(it: Dataset<*>): MimeTypedResult =
242242
with(properties) {
243-
val showFunction = Dataset::class
244-
.memberFunctions
245-
.firstOrNull { it.name == "showString" && it.valueParameters.size == 3 }
246-
247-
textResult(
248-
if (showFunction != null) {
249-
showFunction.call(it, displayLimit, displayTruncate, false) as String
250-
} else {
251-
// if the function cannot be called, make sure it will call println instead
252-
it.show(displayLimit, displayTruncate)
253-
""
254-
}
255-
)
243+
// val showFunction = Dataset::class
244+
// .memberFunctions
245+
// .firstOrNull { it.name == "showString" && it.valueParameters.size == 3 }
246+
//
247+
// textResult(
248+
// if (showFunction != null) {
249+
// showFunction.call(it, displayLimit, displayTruncate, false) as String
250+
// } else {
251+
// // if the function cannot be called, make sure it will call println instead
252+
// it.show(displayLimit, displayTruncate)
253+
// ""
254+
// }
255+
// )
256+
257+
// don't actually render, instead use `show()`, which calls System.out
258+
it.show(displayLimit, displayTruncate)
259+
textResult("")
256260
}
257261

258262

0 commit comments

Comments
 (0)