Skip to content

Commit

Permalink
Removed floor function from test cases
Browse files Browse the repository at this point in the history
Task: BABEL-4214

Signed-off-by: Deepakshi Mittal <[email protected]>
  • Loading branch information
deepakshi-mittal committed Oct 20, 2023
1 parent 11d5e78 commit 4ce5bb1
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 9 deletions.
44 changes: 38 additions & 6 deletions test/JDBC/expected/BABEL-4214-vu-verify.out
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,27 @@ bit
~~END~~


SELECT FLOOR(CAST(CAST('1900-01-10 11:00:50.675' AS DATETIME) AS FLOAT));
SELECT CAST(CAST('1900-01-10 11:00:50.675' AS DATETIME) AS FLOAT);
GO
~~START~~
float
9.0
9.458912037037036
~~END~~


SELECT FLOOR(CAST(CAST('1900-01-10 11:00:50.675' AS DATETIME) AS FLOAT)) +.999999;
SELECT CAST(CAST('1900-01-10 11:00:50.675' AS DATETIME) AS FLOAT) +.999999;
GO
~~START~~
float
9.999999
10.458911037037037
~~END~~


SELECT CAST(FLOOR(CAST(CAST('1900-01-10 11:00:50.675' AS DATETIME) AS FLOAT)) AS DATETIME);
SELECT CAST(CAST(CAST('1900-01-10 11:00:50.675' AS DATETIME) AS FLOAT) AS DATETIME);
GO
~~START~~
datetime
1900-01-10 00:00:00.0
1900-01-10 11:00:50.0
~~END~~


Expand Down Expand Up @@ -403,6 +403,38 @@ int
~~END~~


SELECT CONVERT(BIT, ISNULL(CAST('1900-01-10 11:00:50.675' AS SMALLDATETIME), 0));
GO
~~START~~
bit
1
~~END~~


SELECT CAST(CAST('1900-01-10 11:00:50.675' AS SMALLDATETIME) AS FLOAT);
GO
~~START~~
float
9.459027777777777
~~END~~


SELECT CAST(CAST('1900-01-10 11:00:50.675' AS SMALLDATETIME) AS FLOAT) +.999999;
GO
~~START~~
float
10.459026777777778
~~END~~


SELECT CAST(CAST(CAST('1900-01-10 11:00:50.675' AS SMALLDATETIME) AS FLOAT) AS SMALLDATETIME);
GO
~~START~~
smalldatetime
1900-01-10 11:01:00.0
~~END~~


SELECT CAST(CAST('1900-01-10 12:56:50.675' AS SMALLDATETIME) AS BIT);
GO
~~START~~
Expand Down
18 changes: 15 additions & 3 deletions test/JDBC/input/BABEL-4214-vu-verify.sql
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ GO
SELECT CONVERT(BIT, ISNULL(CAST('1900-01-10 11:00:50.675' AS DATETIME), 0));
GO

SELECT FLOOR(CAST(CAST('1900-01-10 11:00:50.675' AS DATETIME) AS FLOAT));
SELECT CAST(CAST('1900-01-10 11:00:50.675' AS DATETIME) AS FLOAT);
GO

SELECT FLOOR(CAST(CAST('1900-01-10 11:00:50.675' AS DATETIME) AS FLOAT)) +.999999;
SELECT CAST(CAST('1900-01-10 11:00:50.675' AS DATETIME) AS FLOAT) +.999999;
GO

SELECT CAST(FLOOR(CAST(CAST('1900-01-10 11:00:50.675' AS DATETIME) AS FLOAT)) AS DATETIME);
SELECT CAST(CAST(CAST('1900-01-10 11:00:50.675' AS DATETIME) AS FLOAT) AS DATETIME);
GO

SELECT CAST(CAST('1900-01-10 12:56:50.675' AS DATETIME) AS BIT);
Expand Down Expand Up @@ -152,6 +152,18 @@ GO
SELECT babel_4214_smalldatetime_to_int_function();
GO

SELECT CONVERT(BIT, ISNULL(CAST('1900-01-10 11:00:50.675' AS SMALLDATETIME), 0));
GO

SELECT CAST(CAST('1900-01-10 11:00:50.675' AS SMALLDATETIME) AS FLOAT);
GO

SELECT CAST(CAST('1900-01-10 11:00:50.675' AS SMALLDATETIME) AS FLOAT) +.999999;
GO

SELECT CAST(CAST(CAST('1900-01-10 11:00:50.675' AS SMALLDATETIME) AS FLOAT) AS SMALLDATETIME);
GO

SELECT CAST(CAST('1900-01-10 12:56:50.675' AS SMALLDATETIME) AS BIT);
GO

Expand Down

0 comments on commit 4ce5bb1

Please sign in to comment.