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

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

Open
vecrvecr opened this issue Oct 12, 2024 · 0 comments

Comments

@vecrvecr
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant