MCPcopy Create free account
hub / github.com/sql-machine-learning/sqlflow / createTestingHiveDB

Function createTestingHiveDB

go/database/testing.go:111–120  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

109}
110
111func createTestingHiveDB() *DB {
112 db, e := OpenAndConnectDB(GetTestingHiveURL())
113 assertNoErr(e)
114 _, e = db.Exec("CREATE DATABASE IF NOT EXISTS sqlflow_models;")
115 assertNoErr(e)
116 assertNoErr(testdata.Popularize(db.DB, testdata.IrisHiveSQL))
117 assertNoErr(testdata.Popularize(db.DB, testdata.ChurnHiveSQL))
118 assertNoErr(testdata.Popularize(db.DB, testdata.HousingSQL))
119 return db
120}
121
122func testingMaxComputeConfig() *gomaxcompute.Config {
123 endpoint := test.GetEnv("SQLFLOW_TEST_DB_MAXCOMPUTE_ENDPOINT", "http://service-maxcompute.com/api")

Callers 1

createTestingDBFunction · 0.85

Calls 4

PopularizeFunction · 0.92
OpenAndConnectDBFunction · 0.85
GetTestingHiveURLFunction · 0.85
assertNoErrFunction · 0.85

Tested by

no test coverage detected