Documentation ¶
Index ¶
Constants ¶
View Source
const (
NumericalPrecision float64 = 1e-1
)
NumericalPrecision is based on experiment
Variables ¶
View Source
var (
TableToPartyCode map[string]string
)
Functions ¶
func CheckResult ¶
func CheckResult(testDataSource TestDataSource, expected *ResultTable, answer []*scql.Tensor, mysqlQueryString, errInfo string) (err error)
func FillTableToPartyCodeMap ¶
Types ¶
type QueryCase ¶
type QueryCase struct { Name string `json:"name"` View []string `json:"view"` Query string `json:"query"` MySQLQuery string `json:"mysql_query"` Result *ResultTable `json:"result"` }
type QueryTestSuit ¶
type QueryTestSuit struct {
Queries []QueryCase
}
type ResultColumn ¶
type ResultColumn struct { Name string `json:"name"` Ss []string `json:"string"` Int64s []int64 `json:"int"` Bools []bool `json:"bool"` Doubles []float64 `json:"float"` }
func (*ResultColumn) Getlen ¶
func (c *ResultColumn) Getlen() int
type ResultTable ¶
type ResultTable struct {
Column []*ResultColumn `json:"column"`
}
type TestDataSource ¶
func (*TestDataSource) ConnDB ¶
func (ds *TestDataSource) ConnDB(conf *config.StorageConf, maxRetries int, retryDelay time.Duration) (err error)
connDB creates a connection to the MySQL instance
func (*TestDataSource) TruncateTable ¶
func (ds *TestDataSource) TruncateTable(tableName string) error
Truncate table
Click to show internal directories.
Click to hide internal directories.