Skip to content

Binding issue with column names starting with "nullable" or similar variations #281

@vecrvecr

Description

@vecrvecr

It seems like a minor bug, but there appears to be an issue when querying columns with names that begin with “nullable" (or similar variations, like "nullabl"). Specifically, queries will fail if specified in the format nullable_column: nullable_column. However, queries with these names work if the binding is omitted.

This issue does not depend on the data type of the column, as it has been tested with various types (e.g., Float?, Float, String?, etc.), all of which produce the same behavior. Columns with names that include variations of “nullable,” such as nullable2 and nullablNumber or even nullableadssa, all face this issue. In contrast, unrelated names work as expected, with or without the binding.

Example:

:create TypesTest {
    unique_key: String,
    =>
    nullable_number: Float?,
}

-- This fails:

?[unique_key, nullable_number] := *TypesTest{ unique_key: unique_key, nullable_number: nullable_number }

parser::pest

× The query parser has encountered unexpected input / end of input at 91..91

-- The query succeeds if we omit the binding:

?[unique_key, nullable_number] := *TypesTest{ unique_key: unique_key, nullable_number }

unique_key | nullable_number
------------+-----------------

This issue persists with other similarly named columns, such as:

  1. nullable2_number
  2. nullable_number2
  3. nullablNumber
  4. nullableNumber
  5. nullableadssa

According to cozo --version, I'm using cozo-bin 0.7.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions