Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
fix breaking IT
Browse files Browse the repository at this point in the history
  • Loading branch information
penghuo committed Dec 15, 2020
1 parent 38ef5d3 commit 59a96dc
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.isEmptyOrNullString;
import static org.hamcrest.Matchers.not;
import static org.junit.Assume.assumeThat;

import java.io.IOException;
import java.util.Date;
Expand Down Expand Up @@ -221,19 +220,23 @@ public void castIntFieldToStringWithAliasTest() throws IOException {

@Test
public void castIntFieldToFloatWithoutAliasJdbcFormatTest() {
Assume.assumeTrue(isNewQueryEngineEabled());

JSONObject response = executeJdbcRequest(
"SELECT CAST(balance AS FLOAT) FROM " + TestsConstants.TEST_INDEX_ACCOUNT +
"SELECT CAST(balance AS FLOAT) AS cast_balance FROM " + TestsConstants.TEST_INDEX_ACCOUNT +
" ORDER BY balance DESC LIMIT 1");

verifySchema(response,
schema("cast_balance", null, "float"));

verifyDataRows(response,
rows(49989));
rows(49989.0));
}

@Test
public void castIntFieldToFloatWithAliasJdbcFormatTest() {
Assume.assumeTrue(isNewQueryEngineEabled());

JSONObject response = executeJdbcRequest(
"SELECT CAST(balance AS FLOAT) AS jdbc_float_alias " +
"FROM " + TestsConstants.TEST_INDEX_ACCOUNT + " ORDER BY jdbc_float_alias LIMIT 1");
Expand All @@ -242,7 +245,7 @@ public void castIntFieldToFloatWithAliasJdbcFormatTest() {
schema("jdbc_float_alias", null, "float"));

verifyDataRows(response,
rows(1011));
rows(1011.0));
}

@Test
Expand Down

0 comments on commit 59a96dc

Please sign in to comment.