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

fix: add require check message #3638

Merged
merged 1 commit into from
Dec 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@
// So we should fix it.
private def autoFileLoad(openmldbSession: OpenmldbSession, file: String, format: String,
options: Map[String, String], columns: util.List[Common.ColumnDesc], loadDataSql: String): DataFrame = {
require(format.equals("csv") || format.equals("parquet"))
require(format.equals("csv") || format.equals("parquet"), s"unsupported format $format")
val reader = openmldbSession.getSparkSession.read.options(options)

val (oriSchema, readSchema, tsCols) = HybridseUtil.extractOriginAndReadSchema(columns)
Expand Down Expand Up @@ -451,7 +451,7 @@
}

def hiveDest(path: String): String = {
require(path.toLowerCase.startsWith("hive://"))
require(path.toLowerCase.startsWith("hive://"), s"invalid hive path $path")

Check warning on line 454 in java/openmldb-batch/src/main/scala/com/_4paradigm/openmldb/batch/utils/HybridseUtil.scala

View check run for this annotation

Codecov / codecov/patch

java/openmldb-batch/src/main/scala/com/_4paradigm/openmldb/batch/utils/HybridseUtil.scala#L454

Added line #L454 was not covered by tests
// hive://<table_pattern>
val tableStartPos = 7
path.substring(tableStartPos)
Expand Down
Loading