oracle / oracle/nosql-java-sdk

Clarification Needed: Does Oracle NoSQL Database Support the LIKE Operator?

Open
#139 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
34
Forks
27
Avg merge
13h 59m
Merged PRs (30d)
2

Description

It is unclear whether the LIKE operator is supported in the Oracle NoSQL Database. I attempted to execute a query that appeared to follow the correct syntax but encountered an error message suggesting otherwise.

Example Query
SELECT * FROM jakartanosqltck 
WHERE jakartanosqltck.entity = 'Animal' 
  AND jakartanosqltck.content.name LIKE ?
Error Message

The query fails with the following error:

java.lang.IllegalArgumentException: PREPARE: Illegal Argument: Table, index and unquoted field names may contain only alphanumeric values plus the character "_". Error: at (1, 104) mismatched input 'LIKE' expecting {<EOF>, AND, GROUP, IS, LIMIT, OFFSET, OR, ORDER, '[', '*', '.', '<', '<=', '>', '>=', '=', '!=', LT_ANY, LTE_ANY, GT_ANY, GTE_ANY, EQ_ANY, NEQ_ANY, '+', '-', '/', RDIV, '||'}, at line 1:104
rule stack: [parse]
Observations
  • The error suggests that LIKE is not recognized by the query parser.
  • The query follows the expected SQL syntax for LIKE and uses a placeholder (?) for parameter binding.
  • There is no clear indication in the error message whether the issue lies with the LIKE operator itself or some other part of the query.
Request for Clarification
  1. Does Oracle NoSQL Database support the LIKE operator for string pattern matching?
  2. If not, what is the recommended approach for performing pattern matching in queries? For example, should REGEXP_LIKE be used instead?
  3. If LIKE is supported, is there a specific syntax requirement or limitation that needs to be addressed?
Suggested Improvement

If LIKE is unsupported, it would be helpful for the error message to state this, such as: explicitly

The 'LIKE' operator is not supported in Oracle NoSQL Database. Consider using 'REGEXP_LIKE' for pattern matching.

PS: At the documentation I only find the regular expression: https://docs.oracle.com/en/database/other-databases/nosql-database/24.4/nsdev/regular-expression-conditions.html

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported query, parser error, and the Oracle NoSQL regular-expression conditions documentation linked in the issue. Determine whether LIKE is supported, whether REGEXP_LIKE is the recommended alternative, and whether the documentation or error message should clarify the behavior. Done means the support status and any syntax limitation are clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, sql
Domain
databases, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.