<commit_before># Test the SQRT function, adapted from test-sin.yaml
---
- Properties: all
- suppressed: true
---
- Include: all-types-schema.yaml
# test arity
---
- Statement: SELECT SQRT() FROM all_types
- error: [4250C]
---
- Statement: SELECT SQRT(2.0, 5.0) FROM all_types
- error: [4250C]
---
# Test NULL
- Statement: INSERT INTO all_types (float_field, double_field, smallint_field,
            integer_field, bigint_field, bigint_unsigned_field, decimal_field,
            numeric_field, real_field, varchar_field)
    VALUES (null, null, null, null, null, null, null, null, null, null)
---
- Statement: SELECT SQRT(float_field), SQRT(double_field),
    SQRT(smallint_field), SQRT(integer_field), SQRT(bigint_field),
    SQRT(bigint_unsigned_field), SQRT(decimal_field), SQRT(numeric_field),
    SQRT(real_field), SQRT(varchar_field) FROM all_types
- output: [[null, null, null, null, null, null, null, null, null, null]]
---
- Statement: DELETE FROM all_types
---
- Statement: INSERT INTO all_types (float_field, double_field, smallint_field,
            integer_field, bigint_field, bigint_unsigned_field, decimal_field,
            numeric_field, real_field, varchar_field)
    VALUES (16.0, 16.0, 16, 16, 16, 16, 16.0, 16.0, 16.0, '16'),
    (5.5, 5.5, 5, 5, 5, 5, 5.5, 5.0, 5.0, '5.5'),
    (0.0, 0.0, 0, 0, 0, 0, 0.0, 0.0, 0.0, '0.0'),
    (-2.0, -2.0, -2, -2, -2, -2, -2.0, -2.0, -2.0, '-2.0')
---
# Unsure whether SQRT(negative) returns NaN or null?
- Statement: SELECT SQRT(float_field), SQRT(double_field),
    SQRT(smallint_field), SQRT(integer_field), SQRT(bigint_field),
    SQRT(bigint_unsigned_field), SQRT(decimal_field), SQRT(numeric_field), 
    SQRT(real_field), SQRT(varchar_field) FROM all_types
- output: [[4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0],
           [2.34520788, 2.34520788, 2.23606798, 2.23606798, 2.23606798, 
              2.23606798, 2.23606798, 2.23606798, 2.23606798, 2.34520788],
           [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
           [NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN]]

# Infinity, NaN
---
- Statement: DELETE FROM all_types
---
- Statement: INSERT INTO all_types (double_field, float_field, real_field)
    VALUES ('Infinity', 'Infinity', 'Infinity'),
    ('-Infinity', '-Infinity', '-Infinity'),
    ('NaN', 'NaN', 'NaN')
---
- Statement: SELECT SQRT(double_field), SQRT(float_field), SQRT(real_field)
    FROM all_types
- output: [['Infinity', 'Infinity', 'Infinity'], 
           ['-Infinity', '-Infinity', '-Infinity'], 
           [NaN, NaN, NaN]]

# Literals
---
- Statement: SELECT SQRT(0) FROM all_types
- output: [[0.0], [0.0], [0.0]]
---
- Statement: SELECT SQRT(4) FROM all_types
- output: [[2.0], [2.0], [2.0]]
# Parameters
---
- Statement: DELETE FROM all_types
---
- Statement: INSERT INTO all_types (double_field) VALUES (1.0)
---
- Statement: SELECT SQRT(?) FROM all_types
- params: [[0.0]]
- output: [[0.0]]
---
- Statement: SELECT SQRT(?) FROM all_types
- params: [[4.0]]
- output: [[2.0]]
---
- Statement: SELECT SQRT(?) FROM all_types
- params: [[-4.0]]
- output: [[NaN]]
---
# Test WHERE - positive, negative, zero, null
- Statement: SELECT double_field from all_types where SQRT(100.0) = 10.0
- output: [[1.0]]
---
- Statement: SELECT double_field from all_types where SQRT(-100.0) = NaN
- output: [[1.0]]
---
- Statement: SELECT double_field from all_types where SQRT(0.0) = 0.0
- output: [[1.0]]
---
- Statement: SELECT double_field from all_types where SQRT(null) = null
- output: [[1.0]]

...<commit_msg>Minor change: capitalized where -> WHERE in the YAML tests.<commit_after># Test the SQRT function, adapted from test-sin.yaml
---
- Properties: all
- suppressed: true
---
- Include: all-types-schema.yaml
# test arity
---
- Statement: SELECT SQRT() FROM all_types
- error: [4250C]
---
- Statement: SELECT SQRT(2.0, 5.0) FROM all_types
- error: [4250C]
---
# Test NULL
- Statement: INSERT INTO all_types (float_field, double_field, smallint_field,
            integer_field, bigint_field, bigint_unsigned_field, decimal_field,
            numeric_field, real_field, varchar_field)
    VALUES (null, null, null, null, null, null, null, null, null, null)
---
- Statement: SELECT SQRT(float_field), SQRT(double_field),
    SQRT(smallint_field), SQRT(integer_field), SQRT(bigint_field),
    SQRT(bigint_unsigned_field), SQRT(decimal_field), SQRT(numeric_field),
    SQRT(real_field), SQRT(varchar_field) FROM all_types
- output: [[null, null, null, null, null, null, null, null, null, null]]
---
- Statement: DELETE FROM all_types
---
- Statement: INSERT INTO all_types (float_field, double_field, smallint_field,
            integer_field, bigint_field, bigint_unsigned_field, decimal_field,
            numeric_field, real_field, varchar_field)
    VALUES (16.0, 16.0, 16, 16, 16, 16, 16.0, 16.0, 16.0, '16'),
    (5.5, 5.5, 5, 5, 5, 5, 5.5, 5.0, 5.0, '5.5'),
    (0.0, 0.0, 0, 0, 0, 0, 0.0, 0.0, 0.0, '0.0'),
    (-2.0, -2.0, -2, -2, -2, -2, -2.0, -2.0, -2.0, '-2.0')
---
# Unsure whether SQRT(negative) returns NaN or null?
- Statement: SELECT SQRT(float_field), SQRT(double_field),
    SQRT(smallint_field), SQRT(integer_field), SQRT(bigint_field),
    SQRT(bigint_unsigned_field), SQRT(decimal_field), SQRT(numeric_field), 
    SQRT(real_field), SQRT(varchar_field) FROM all_types
- output: [[4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0],
           [2.34520788, 2.34520788, 2.23606798, 2.23606798, 2.23606798, 
              2.23606798, 2.23606798, 2.23606798, 2.23606798, 2.34520788],
           [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
           [NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN]]

# Infinity, NaN
---
- Statement: DELETE FROM all_types
---
- Statement: INSERT INTO all_types (double_field, float_field, real_field)
    VALUES ('Infinity', 'Infinity', 'Infinity'),
    ('-Infinity', '-Infinity', '-Infinity'),
    ('NaN', 'NaN', 'NaN')
---
- Statement: SELECT SQRT(double_field), SQRT(float_field), SQRT(real_field)
    FROM all_types
- output: [['Infinity', 'Infinity', 'Infinity'], 
           ['-Infinity', '-Infinity', '-Infinity'], 
           [NaN, NaN, NaN]]

# Literals
---
- Statement: SELECT SQRT(0) FROM all_types
- output: [[0.0], [0.0], [0.0]]
---
- Statement: SELECT SQRT(4) FROM all_types
- output: [[2.0], [2.0], [2.0]]
# Parameters
---
- Statement: DELETE FROM all_types
---
- Statement: INSERT INTO all_types (double_field) VALUES (1.0)
---
- Statement: SELECT SQRT(?) FROM all_types
- params: [[0.0]]
- output: [[0.0]]
---
- Statement: SELECT SQRT(?) FROM all_types
- params: [[4.0]]
- output: [[2.0]]
---
- Statement: SELECT SQRT(?) FROM all_types
- params: [[-4.0]]
- output: [[NaN]]
---
# Test WHERE - positive, negative, zero, null
- Statement: SELECT double_field from all_types WHERE SQRT(100.0) = 10.0
- output: [[1.0]]
---
- Statement: SELECT double_field from all_types WHERE SQRT(-100.0) = NaN
- output: [[1.0]]
---
- Statement: SELECT double_field from all_types WHERE SQRT(0.0) = 0.0
- output: [[1.0]]
---
- Statement: SELECT double_field from all_types WHERE SQRT(null) = null
- output: [[1.0]]

...
{'fraction_non_alphanumeric': 0.1842031029619182, 'fraction_numerical': 0.07447108603667137, 'mean_word_length': 3.2871825876662637, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1918888', 'n_tokens_mistral': 3121, 'n_tokens_neox': 2779, 'n_words': 704}