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

Renamed ID->TAG, MEASUREMENT->FIELD in create/desc table sql #115

Closed
wants to merge 1 commit into from
Closed
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
28 changes: 14 additions & 14 deletions test/e2e/e2e_table_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ func (s *e2eTableTestSuite) Test_GetSessionFromSessionPoolWithSpecificDatabase()

session1, err := sessionPool.GetSession()
assert.NoError(err)
s.checkError(session1.ExecuteNonQueryStatement("create table table_in_" + database + " (id1 string id, id2 string id, s1 text measurement, s2 text measurement)"))
s.checkError(session1.ExecuteNonQueryStatement("create table table_in_" + database + " (tag1 string tag, tag2 string tag, s1 text field, s2 text field)"))
session1.Close()

var wg sync.WaitGroup
Expand Down Expand Up @@ -239,7 +239,7 @@ func (s *e2eTableTestSuite) Test_GetSessionFromSessionPoolWithSpecificDatabase()

func (s *e2eTableTestSuite) Test_InsertTabletAndQuery() {
assert := s.Require()
s.checkError(s.session.ExecuteNonQueryStatement("create table t1 (id1 string id, id2 string id, s1 text measurement, s2 text measurement)"))
s.checkError(s.session.ExecuteNonQueryStatement("create table t1 (tag1 string tag, tag2 string tag, s1 text field, s2 text field)"))

timeoutInMs := int64(10000)

Expand All @@ -255,11 +255,11 @@ func (s *e2eTableTestSuite) Test_InsertTabletAndQuery() {
// insert relational tablet
tablet, err := client.NewRelationalTablet("t1", []*client.MeasurementSchema{
{
Measurement: "id1",
Measurement: "tag1",
DataType: client.STRING,
},
{
Measurement: "id2",
Measurement: "tag2",
DataType: client.STRING,
},
{
Expand All @@ -274,14 +274,14 @@ func (s *e2eTableTestSuite) Test_InsertTabletAndQuery() {
assert.NoError(err)

values := [][]interface{}{
{"id1_field_1", "id2_field_1", "s1_value_1", "s2_value_1"},
{"id1_field_1", "id2_field_1", "s1_value_2", "s2_value_2"},
{"id1_field_1", "id2_field_1", nil, "s2_value_2"},
{"id1_field_2", "id2_field_2", "s1_value_1", "s2_value_1"},
{"id1_field_2", "id2_field_2", "s1_value_1", "s2_value_1"},
{"id1_field_3", "id2_field_3", "s1_value_1", "s2_value_1"},
{"id1_field_3", "id2_field_3", "s1_value_2", nil},
{"id1_field_3", "id2_field_3", "s1_value_3", "s2_value_3"},
{"tag1_field_1", "tag2_field_1", "s1_value_1", "s2_value_1"},
{"tag1_field_1", "tag2_field_1", "s1_value_2", "s2_value_2"},
{"tag1_field_1", "tag2_field_1", nil, "s2_value_2"},
{"tag1_field_2", "tag2_field_2", "s1_value_1", "s2_value_1"},
{"tag1_field_2", "tag2_field_2", "s1_value_1", "s2_value_1"},
{"tag1_field_3", "tag2_field_3", "s1_value_1", "s2_value_1"},
{"tag1_field_3", "tag2_field_3", "s1_value_2", nil},
{"tag1_field_3", "tag2_field_3", "s1_value_3", "s2_value_3"},
}

ts := int64(0)
Expand All @@ -308,8 +308,8 @@ func (s *e2eTableTestSuite) Test_InsertTabletAndQuery() {
break
}
assert.Equal(count, dataSet.GetInt64("time"))
assert.Equal(values[count][0], getValueFromDataSet(dataSet, "id1"))
assert.Equal(values[count][1], getValueFromDataSet(dataSet, "id2"))
assert.Equal(values[count][0], getValueFromDataSet(dataSet, "tag1"))
assert.Equal(values[count][1], getValueFromDataSet(dataSet, "tag2"))
assert.Equal(values[count][2], getValueFromDataSet(dataSet, "s1"))
assert.Equal(values[count][3], getValueFromDataSet(dataSet, "s2"))
count++
Expand Down
Loading