func RunSimpleSuite(t TestingT) {

	// // Function in select projected columns that needs to be late evaluated.
	// // "select json.jmespath(body,\"name\") AS name FROM article WHERE `author` = \"aaron\";",
	// TestSelect(t, "select json.jmespath(json_data,\"name\") AS name FROM users WHERE `email` = \"aaron@email.com\";",
	// 	[][]driver.Value{{"aaron"}},
	// )
	// return

	// Literal Queries
	TestSelect(t, `select 1;`,
		[][]driver.Value{{int64(1)}},
	)
	TestSelect(t, `select 1, "hello";`,
		[][]driver.Value{{int64(1), "hello"}},
	)

	// - ensure we can evaluate against "NULL"
	// - extra paren in where
	// - `db`.`col` syntax
	TestSelect(t, "SELECT user_id FROM users WHERE (`users.user_id` != NULL)",
		[][]driver.Value{{"hT2impsabc345c"}, {"9Ip1aKbeZe2njCDM"}, {"hT2impsOPUREcVPc"}},
	)
	TestSelect(t, "SELECT email FROM users WHERE interests != NULL)",
		[][]driver.Value{{"aaron@email.com"}, {"bob@email.com"}},
	)

	TestSelect(t, "SELECT email FROM users WHERE (`users`.`email` like \"%aaron%\");",
		[][]driver.Value{{"aaron@email.com"}},
	)

	// - user_id != NULL (on string column)
	// - as well as count(*)
	TestSelect(t, "SELECT COUNT(*) AS count FROM users WHERE (`users.user_id` != NULL)",
		[][]driver.Value{{int64(3)}},
	)

	// Aliasing columns in group by
	TestSelect(t, "select `users`.`user_id` AS userids FROM users WHERE email = \"aaron@email.com\" GROUP BY `users`.`user_id`;",
		[][]driver.Value{{"9Ip1aKbeZe2njCDM"}},
	)

	// nested functions in aggregations
	// - note also lack of group-by ie determine Is Agg query in rel ast
	TestSelect(t, "SELECT AVG(CHAR_LENGTH(CAST(`email` AS CHAR))) AS `len` FROM `users`",
		[][]driver.Value{{float64(14.0)}}, // aaron@email.combob@email.comnot_an_email_2 = 42 characters / 3 = 14
	)

	// Distinct keyword
	TestSelect(t, "SELECT COUNT(DISTINCT(`users`.`email`)) AS cd FROM users",
		[][]driver.Value{{int64(0)}},
	)

	// Function in select projected columns that needs to be late evaluated.
	// "select json.jmespath(body,\"name\") AS name FROM article WHERE `author` = \"aaron\";",
	TestSelect(t, "select json.jmespath(json_data,\"name\") AS name FROM users WHERE `email` = \"aaron@email.com\";",
		[][]driver.Value{{"aaron"}},
	)

	return
	TestSelect(t, "SELECT email FROM users ORDER BY email DESC",
		[][]driver.Value{{"not_an_email_2"}, {"bob@email.com"}, {"aaron@email.com"}},
	)
	TestSelect(t, "SELECT email FROM users ORDER BY email ASC",
		[][]driver.Value{{"aaron@email.com"}, {"bob@email.com"}, {"not_an_email_2"}},
	)

	// This is an error because we have schema on this table, and this column
	// doesn't exist.
	TestSelectErr(t, "SELECT email, non_existent_field FROM users ORDER BY email ASC", nil)

	/*
		// TODO: #56 DISTINCT inside count()
		testutil.TestSelect(t, "SELECT COUNT(DISTINCT(`users.user_id`)) AS cd FROM users",
			[][]driver.Value{{int64(3)}},
		)

		// TODO: #56 this doesn't work because ordering is non-deterministic coming out of group by currently
		//  which technically don't think there is any sql expectation of ordering, but there is for this test harness
		testutil.TestSelect(t, "select `users`.`user_id` AS userids FROM users GROUP BY `users`.`user_id`;",
			[][]driver.Value{{"hT2impsabc345c"}, {"9Ip1aKbeZe2njCDM"}, {"hT2impsOPUREcVPc"}},
		)
	*/
}
// RunSimpleSuite run the normal DML SQL test suite.
RunSimpleSuite run the normal DML SQL test suite.
// RunSimpleSuite run the normal DML SQL test suite .
func RunSimpleSuite(t TestingT) {
	TestSelect(t, `select 1;`,
		[][]driver.Value{{int64(1)}},
	)
	TestSelect(t, `select 1, "hello";`,
		[][]driver.Value{{int64(1), "hello"}},
	)
	TestSelect(t, "SELECT user_id FROM users WHERE (`users.user_id` != NULL)",
		[][]driver.Value{{"hT2impsabc345c"}, {"9Ip1aKbeZe2njCDM"}, {"hT2impsOPUREcVPc"}},
	)
	TestSelect(t, "SELECT email FROM users WHERE interests != NULL)",
		[][]driver.Value{{"aaron@email.com"}, {"bob@email.com"}},
	)
	TestSelect(t, "SELECT email FROM users WHERE (`users`.`email` like \"%aaron%\");",
		[][]driver.Value{{"aaron@email.com"}},
	)
	TestSelect(t, "SELECT COUNT(*) AS count FROM users WHERE (`users.user_id` != NULL)",
		[][]driver.Value{{int64(3)}},
	)
	TestSelect(t, "select `users`.`user_id` AS userids FROM users WHERE email = \"aaron@email.com\" GROUP BY `users`.`user_id`;",
		[][]driver.Value{{"9Ip1aKbeZe2njCDM"}},
	)
	TestSelect(t, "SELECT AVG(CHAR_LENGTH(CAST(`email` AS CHAR))) AS `len` FROM `users`",
		[][]driver.Value{{float64(14.0)}}, 
	)
	TestSelect(t, "SELECT COUNT(DISTINCT(`users`.`email`)) AS cd FROM users",
		[][]driver.Value{{int64(0)}},
	)
	TestSelect(t, "select json.jmespath(json_data,\"name\") AS name FROM users WHERE `email` = \"aaron@email.com\";",
		[][]driver.Value{{"aaron"}},
	)
	return
	TestSelect(t, "SELECT email FROM users ORDER BY email DESC",
		[][]driver.Value{{"not_an_email_2"}, {"bob@email.com"}, {"aaron@email.com"}},
	)
	TestSelect(t, "SELECT email FROM users ORDER BY email ASC",
		[][]driver.Value{{"aaron@email.com"}, {"bob@email.com"}, {"not_an_email_2"}},
	)
	TestSelectErr(t, "SELECT email, non_existent_field FROM users ORDER BY email ASC", nil)
}
func RunSimpleSuite ( t TestingT ) { TestSelect ( t , `select 1;` , [ ] [ ] driver . Value { { int64 ( 1 ) } } , ) TestSelect ( t , `select 1, "hello";` , [ ] [ ] driver . Value { { int64 ( 1 ) , " " } } , ) TestSelect ( t , " " , [ ] [ ] driver . Value { { " " } , { " " } , { " " } } , ) TestSelect ( t , " " , [ ] [ ] driver . Value { { " " } , { " " } } , ) TestSelect ( t , " \" \" " , [ ] [ ] driver . Value { { " " } } , ) TestSelect ( t , " " , [ ] [ ] driver . Value { { int64 ( 3 ) } } , ) TestSelect ( t , " \" \" " , [ ] [ ] driver . Value { { " " } } , ) TestSelect ( t , " " , [ ] [ ] driver . Value { { float64 ( 14.0 ) } } , ) TestSelect ( t , " " , [ ] [ ] driver . Value { { int64 ( 0 ) } } , ) TestSelect ( t , " \" \" \" \" " , [ ] [ ] driver . Value { { " " } } , ) return TestSelect ( t , " " , [ ] [ ] driver . Value { { " " } , { " " } , { " " } } , ) TestSelect ( t , " " , [ ] [ ] driver . Value { { " " } , { " " } , { " " } } , ) TestSelectErr ( t , " " , nil ) }
RunSimpleSuite run the normal DML SQL test suite.
RunSimpleSuite run the normal DML SQL test suite .
// // Function in select projected columns that needs to be late evaluated. // // "select json.jmespath(body,\"name\") AS name FROM article WHERE `author` = \"aaron\";", // TestSelect(t, "select json.jmespath(json_data,\"name\") AS name FROM users WHERE `email` = \"aaron@email.com\";", // 	[][]driver.Value{{"aaron"}}, // ) // return // Literal Queries // - ensure we can evaluate against "NULL" // - extra paren in where // - `db`.`col` syntax // - user_id != NULL (on string column) // - as well as count(*) // Aliasing columns in group by // nested functions in aggregations // - note also lack of group-by ie determine Is Agg query in rel ast // aaron@email.combob@email.comnot_an_email_2 = 42 characters / 3 = 14 // Distinct keyword // Function in select projected columns that needs to be late evaluated. // "select json.jmespath(body,\"name\") AS name FROM article WHERE `author` = \"aaron\";", // This is an error because we have schema on this table, and this column // doesn't exist. /*
		// TODO: #56 DISTINCT inside count()
		testutil.TestSelect(t, "SELECT COUNT(DISTINCT(`users.user_id`)) AS cd FROM users",
			[][]driver.Value{{int64(3)}},
		)

		// TODO: #56 this doesn't work because ordering is non-deterministic coming out of group by currently
		//  which technically don't think there is any sql expectation of ordering, but there is for this test harness
		testutil.TestSelect(t, "select `users`.`user_id` AS userids FROM users GROUP BY `users`.`user_id`;",
			[][]driver.Value{{"hT2impsabc345c"}, {"9Ip1aKbeZe2njCDM"}, {"hT2impsOPUREcVPc"}},
		)
	*/