-
Notifications
You must be signed in to change notification settings - Fork 71
Deephaven csv as default #1057
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
Deephaven csv as default #1057
Conversation
50ce472
to
4004b65
Compare
3496cb7
to
d6fe324
Compare
8b8bb80
to
9a87d0e
Compare
79d771d
to
b24db62
Compare
43f191d
to
6055995
Compare
dataframe-csv/src/test/kotlin/org/jetbrains/kotlinx/dataframe/io/DelimCsvTsvTests.kt
Show resolved
Hide resolved
|
||
override fun acceptsExtension(ext: String): Boolean = ext == "csv" | ||
|
||
override fun acceptsSample(sample: SupportedFormatSample): Boolean = true // Extension is enough | ||
|
||
// if the user adds the dataframe-csv module, this will override old CSV reading method in DataFrame.read() | ||
override val testOrder: Int = CSV().testOrder - 1 | ||
override val testOrder: Int = 20_000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does it mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the test order for guess.kt
, so the order in which DataFrame.read()
tries the supported formats. CSV used to have 20,000, so now the new one gets the same order number.
* They'll hopefully be faster and better._ | ||
* | ||
* @param file The file to read. Can also be compressed as `.gz` or `.zip`, see [Compression][org.jetbrains.kotlinx.dataframe.io.Compression]. | ||
* @param file The file to read. Can also be compressed as `.gz` or `.zip`, see [Compression]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it navigable correctly for now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it may not be, good catch! KoDEx is not good at redirecting references/paths outside the current module.
).convert("col2").toStr() | ||
|
||
val str = StringWriter() | ||
df.writeCSV(str) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, where all these tests (with this logic) was moved or adopted for the Deephaven csv?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exactly, it's in DelimCsvTsvTests in dataframe-csv
|
||
internal const val WRITE_CSV = | ||
"The writeCSV() functions are deprecated in favor of writeCsv() in dataframe-csv. $MESSAGE_0_17" | ||
internal const val WRITE_CSV_IMPORT = "org.jetbrains.kotlinx.dataframe.io.writeCsv" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great job!
charset, | ||
) | ||
} | ||
): DataFrame<*> = error(DF_READ_NO_CSV) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it true, that it will be not possible to read from remote endpoint the csv with new parser? Or am I wrong?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No you still can, no problem. By URL, or String. It's tested in the dataframe-csv module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is DataFrame.read() that weird overload that we deprecated already some time ago.
162f248
to
d32cbb9
Compare
d32cbb9
to
1e2bb06
Compare
Fixes #1047
Works to finish #827
DataFrame.read()
functions@Import
is gonna be experimental anyway. The only reason the old csv integration still has compiler plugin support is to use it as example for the new csv integration later.testImplementation(project(":dataframe-csv"))
to :core until we split off jupyter and merge sample.api tests