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

Integration Tests for SQL Interface #343

Merged
merged 34 commits into from
Sep 1, 2021
Merged

Conversation

S-Harshit
Copy link
Contributor

@S-Harshit S-Harshit commented Jun 20, 2021

Adding Tests for SQL interface

Checklist for Operators and Functions covered

Comparison operators

  • value1 = value2
  • value1 <> value2
  • value1 != value2
  • value1 > value2
  • value1 >= value2
  • value1 < value2
  • value1 <= value2
  • value IS NULL
  • value IS NOT NULL
  • value1 IS DISTINCT FROM value2
  • value1 IS NOT DISTINCT FROM value2
  • value1 BETWEEN value2 AND value3
  • value1 NOT BETWEEN value2 AND value3
  • string1 LIKE string2 [ ESCAPE string3 ]
  • string1 NOT LIKE string2 [ ESCAPE string3 ]
  • string1 SIMILAR TO string2 [ ESCAPE string3 ]
  • string1 NOT SIMILAR TO string2 [ ESCAPE string3 ]
  • value IN (value [, value]*)
  • value NOT IN (value [, value]*)
  • value IN (sub-query)
  • value NOT IN (sub-query)
  • value comparison SOME (sub-query)
  • value comparison ANY (sub-query)
  • value comparison ALL (sub-query)
  • EXISTS (sub-query)

Logical operators

  • boolean1 OR boolean2
  • boolean1 AND boolean2
  • NOT boolean
  • boolean IS FALSE
  • boolean IS NOT FALSE
  • boolean IS TRUE
  • boolean IS NOT TRUE

Arithmetic operators and functions

  • + numeric
  • - numeric
  • numeric1 + numeric2
  • numeric1 - numeric2
  • numeric1 * numeric2
  • numeric1 / numeric2
  • numeric1 % numeric2
  • POWER(numeric1, numeric2)
  • ABS(numeric)
  • MOD(numeric1, numeric2)
  • SQRT(numeric)
  • LN(numeric)
  • LOG10(numeric)
  • EXP(numeric)
  • CEIL(numeric)
  • FLOOR(numeric)
  • RAND([seed])
  • RAND_INTEGER([seed, ] numeric)
  • ACOS(numeric)
  • ASIN(numeric)
  • ATAN(numeric)
  • ATAN2(numeric, numeric)
  • COS(numeric)
  • COT(numeric)
  • DEGREES(numeric)
  • PI()
  • RADIANS(numeric)
  • ROUND(numeric1 [, numeric2])
  • SIGN(numeric)
  • SIN(numeric)
  • TAN(numeric)
  • TRUNCATE(numeric1 [, numeric2])
  • distance(array1, array2, metric)
  • distance(array1, array2, metric, weights)

Character string operators and functions

  • string || string
  • CHAR_LENGTH(string)
  • CHARACTER_LENGTH(string)
  • UPPER(string)
  • LOWER(string)
  • POSITION(string1 IN string2)
  • POSITION(string1 IN string2 FROM integer)
  • TRIM( { BOTH | LEADING | TRAILING } string1 FROM string2)
  • OVERLAY(string1 PLACING string2 FROM integer [ FOR integer2 ])
  • SUBSTRING(string FROM integer)
  • SUBSTRING(string FROM integer FOR integer)
  • INITCAP(string)

Date/time functions

  • LOCALTIME
  • LOCALTIME(precision)
  • LOCALTIMESTAMP
  • LOCALTIMESTAMP(precision)
  • CURRENT_TIME
  • CURRENT_DATE
  • CURRENT_TIMESTAMP
  • EXTRACT(timeUnit FROM timestamp)
  • FLOOR(timestamp TO timeUnit)
  • CEIL(timestamp TO timeUnit)
  • YEAR(date)
  • QUARTER(date)
  • MONTH(date)
  • WEEK(date)
  • DAYOFYEAR(date)
  • DAYOFMONTH(date)
  • DAYOFWEEK(date)
  • HOUR(date)
  • MINUTE(date)
  • SECOND(date)
  • TIMESTAMPADD(timeUnit, integer, timestamp)
  • TIMESTAMPDIFF(timeUnit, timestamp, timestamp2)

System functions

  • USER
  • CURRENT_USER
  • SESSION_USER
  • SYSTEM_USER

Conditional functions and operators

  • Simple case
  • Searched case
  • NULLIF(value, value)
  • COALESCE(value, value [, value ]*)

Type conversion

  • CAST(value AS type)

Value constructors

  • ROW (value [, value ]*)
  • (value [, value ]* )
  • array ‘[’ index ‘]’
  • ARRAY ‘[’ value [, value ]* ‘]’

@vogti vogti changed the title Adding Tests for SQL Interface Integration Tests for SQL Interface Jun 30, 2021
@vogti vogti added the S-in-progress Still working on this pull request label Jul 14, 2021
@S-Harshit S-Harshit marked this pull request as ready for review August 16, 2021 06:44
Copy link
Member

@vogti vogti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @S-Harshit for this contribution!

@vogti vogti merged commit 9ef2d02 into polypheny:master Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-in-progress Still working on this pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants