GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Comparisons with `schema:types` properties inside `if` are incorrect · Issue #986 · ArcadeData/arcadedb

Comparisons with schema:types properties inside if are incorrect #986

New issue
Copy link
New issue
Copy link
Closed
Closed
Comparisons with schema:types properties inside if are incorrect#986
Copy link
Assignees
lvca
Labels
unable to reproducewaiting for user
Milestone
23.3.1

Description

@gramian
gramian
opened on Mar 30, 2023
Issue body actions

ArcadeDB Version: 23.2.1 (build e8f512f/1677638572021/main)

JDK Version: openjdk 11.0.18 2023-01-17

OS: MacOS 12.6

When using comparison against the name property of schema:types inside a (conditional) expression, wrong logical results are returned.

Expected behavior

'doc' true true true true

Actual behavior

'doc' true false false false

Steps to reproduce

CREATE DOCUMENT TYPE doc;
SELECT name, (name = 'doc'),
             if( (name = 'doc'), true, false),
             if( (name IN ['doc','XXX']), true, false),
             ifnull( (name = 'doc'), null)
FROM schema:types

Activity

  1. gramian
    changed the title [-]Comparisons with `schema:type` properties inside `if` are incorrect[/-] [+]Comparisons with `schema:types` properties inside `if` are incorrect[/+] on Mar 31, 2023
  2. lvca
    added a commit that references this issue on Mar 31, 2023

    test: added test case for issue #986

    1c89139
  3. lvca commented on Mar 31, 2023

    @lvca
    lvca
    on Mar 31, 2023
    Member
    More actions

    Trying to reproduce this without success:

      @Test
      public void testIfWithSchemaResult() throws IOException {
        Assertions.assertTrue(console.parse("connect " + URL));
        Assertions.assertTrue(console.parse("CREATE DOCUMENT TYPE doc;"));
        Assertions.assertTrue(console.parse("CREATE PROPERTY doc.prop STRING;"));
    
        Assertions.assertTrue(console.parse("INSERT INTO doc set name = 'doc'"));
    
        final ResultSet resultSet = console.getDatabase().command("sql",
            "SELECT name, (name = 'doc') as name2, if( (name = 'doc'), true, false) as name3, if( (name IN ['doc','XXX']), true, false) as name4, ifnull( (name = 'doc'), null) as name5 FROM schema:types");
    
        Assertions.assertTrue(resultSet.hasNext());
    
        final Result result = resultSet.next();
    
        Assertions.assertEquals("doc", result.getProperty("name"));
        Assertions.assertTrue((boolean) result.getProperty("name2"));
        Assertions.assertTrue((boolean) result.getProperty("name3"));
        Assertions.assertTrue((boolean) result.getProperty("name4"));
        Assertions.assertTrue((boolean) result.getProperty("name5"));
      }
  4. lvca
    self-assigned this
    on Mar 31, 2023
  5. lvca
    added
    unable to reproduce
    waiting for user
    on Mar 31, 2023
  6. lvca
    added this to the 23.3.1 milestone on Mar 31, 2023
  7. gramian commented on Mar 31, 2023

    @gramian
    gramian
    on Mar 31, 2023
    CollaboratorAuthor
    More actions

    I found this using 23.2.1 in Studio. I just tested the repo head with Studio and Console and it works.
    Sorry, I should have also tested right away on the current head.

    Reacted by Luca Garulli
  8. gramian
    closed this as completedon Mar 31, 2023
  9. lvca commented on Mar 31, 2023

    @lvca
    lvca
    on Mar 31, 2023
    Member
    More actions

    Np, the test case now is in our test suite so we'll avoid any regression on this.

  10. mergify
    added a commit that references this issue on Sep 29, 2025

    chore(deps): bump actions/dependency-review-action from 4.7.3 to 4.8.…

    614daec
  11. mergify
    added 2 commits that reference this issue on May 31, 2026

    chore(deps-dev): bump testcontainers from 12.0.0 to 12.0.1 in /e2e-js…

    1fcdd13

    chore(deps-dev): bump testcontainers from 12.0.0 to 12.0.1 in /e2e-st…

    e21790d
  12. tae898
    added 4 commits that reference this issue on Jun 28, 2026

    test: added test case for issue ArcadeData#986

    f4a67aa

    chore(deps): bump actions/dependency-review-action from 4.7.3 to 4.8.…

    6bc84d2

    chore(deps-dev): bump testcontainers from 12.0.0 to 12.0.1 in /e2e-js…

    d50bea5

    chore(deps-dev): bump testcontainers from 12.0.0 to 12.0.1 in /e2e-st…

    520f149
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @lvca
    lvca

Labels

unable to reproducewaiting for user

Type

No type

Projects

No projects

    Milestone

    • 23.3.1

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.