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 — SQL `map` function fails when applied to specific subquery results · Issue #654 · ArcadeData/arcadedb

SQL map function fails when applied to specific subquery results #654

New issue
Copy link
New issue
Copy link
Closed
Closed
SQL map function fails when applied to specific subquery results#654
Copy link
Assignees
lvca
Labels
invalidThis doesn't seem right
Milestone
23.1.1

Description

@gramian
gramian
opened on Dec 1, 2022
Issue body actions

ArcadeDB Version:v22.10.1 (build e692f4c/1667424782661/main)

JDK Version: openjdk 11.0.16.1 2022-08-12

OS: MacOS 12.6

Dear Developers,

I am trying to form a map from columns. This works if a column is taken directly from a bucket, but if the raw column is used as argument to the map function, ie when extracted via a subquery, it fails.

Expected behavior

(((|map(value, value)| (|1| . "1"))) ((|map(value, value)| (|2| . "2"))) ((|map(value, value)| (|3| . "3"))) ((|map(value, value)| (|9| . "9"))))

Actual behavior

(() () () ())

Additionally, if run from studio, studio crashes.

Steps to reproduce

Given a database with a type named mytype and some records with string property value being '1', '2', '3', '9':

SELECT map(value,value) FROM (SELECT * FROM mytype)

fails, without error on the server side, while

SELECT map(value,value) FROM (SELECT value FROM mytype)

works. Note the difference in the projection of the subquery. I assume the additional info, ie @type etc, when using * makes the difference, but I think it shouldn't, right?

Activity

  1. lvca
    self-assigned this
    on Dec 13, 2022
  2. lvca
    added
    bug
    on Dec 13, 2022
  3. lvca
    added this to the 22.12.1 milestone on Dec 13, 2022
  4. lvca
    modified the milestones: 22.12.1, 23.1.1 on Dec 23, 2022
  5. lvca commented on Dec 30, 2022

    @lvca
    lvca
    on Dec 30, 2022
    Member
    More actions

    I tried the first query and works: SELECT map(value,value) FROM (SELECT * FROM mytype):

    map(value, value)
    --
    {"1":"1"}
    {"2":"2"}
    {"2032023":"2032023"}
    {"3":"3"}
    {"4":"4"}
    {"5":"5"}
    {"6":"6"}
    

    The second query can't work because the subquery is returning a value instead of a record.

  6. lvca
    added
    invalidThis doesn't seem right
    and removed
    bug
    on Dec 30, 2022
  7. gramian commented on Dec 30, 2022

    @gramian
    gramian
    on Dec 30, 2022
    CollaboratorAuthor
    More actions

    Did you try from console or studio? Maybe this is a studio issue.

  8. lvca commented on Dec 30, 2022

    @lvca
    lvca
    on Dec 30, 2022
    Member
    More actions

    Studio

  9. gramian commented on Jan 4, 2023

    @gramian
    gramian
    on Jan 4, 2023
    CollaboratorAuthor
    More actions

    Verfying, using the studio of commit 80bdba9 I get:

    SELECT map(value,value) FROM (SELECT * FROM mytype)
    

    works.

    Reacted by Luca Garulli
  10. gramian
    closed this as completedon Jan 4, 2023
  11. mergify
    added a commit that references this issue on Jul 19, 2026

    chore(deps): bump io.github.jbellis:jvector from 4.0.0-rc.8-hf1 to 4.…

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

Metadata

Metadata

Assignees

  • @lvca
    lvca

Labels

invalidThis doesn't seem right

Type

No type

Projects

No projects

    Milestone

    • 23.1.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.