Skip to content

order of properties returned by SELECT does not match order specified #726

@vic0824

Description

@vic0824

ArcadeDB Version: v22.11.1

JDK Version: openjdk 11.0.12 2021-07-20 LTS

OpenJDK Runtime Environment Corretto-11.0.12.7.1 (build 11.0.12+7-LTS)
OpenJDK 64-Bit Server VM Corretto-11.0.12.7.1 (build 11.0.12+7-LTS, mixed mode)

OS: CentOS release 6.9 (Final)

Expected behavior

the records returned by a SELECT are presented with the properties listed in the same order in which they were specified in the SELECT.

Actual behavior

the records returned by a SELECT are presented in an "ArcadeDB default order", which is not easy to understand and is not the same order specified in the SELECT.

Steps to reproduce

  1. create a database
  2. create a Document type called Product
  3. create properties called name, type, start, stop (in this order)
  4. add a record: name = CS_OPER_AUX_LS_MAP_00000000T000000_99999999T999999_0002.DBL, type = AUX_LS_MAP, start = 19000101_000000.000000, stop = 99991231_235959.000000
  5. add another record: name = CS_OPER_AUX_ODLE___00000000T000000_99999999T999999_0002.DBL, type = AUX_ODLE__, start = 19000101_000000.000000, stop = 99991231_235959.000000
  6. execute "select name, type from Product limit 2" and verify that records are presented with the properties in the following order: [name, type]
  7. execute "select name, type, start from Product limit 2" and verify that records are presented with the properties in the following order: [name, start, type]
  8. execute "select name, type, start, stop from Product limit 2" and verify that records are presented with the properties in the following order: [stop, name, start, type]
  9. execute "select from Product limit 2" and verify that the record are presented with the properties in the following order: [#, [@]RID, @type, stop, name, start, type]

This is the test that I have performed:

select name, type from Product limit 2

+----+-----------------------------------------------------------+----------+
|# |name |type |
+----+-----------------------------------------------------------+----------+
|0 |CS_OPER_AUX_LS_MAP_00000000T000000_99999999T999999_0002.DBL|AUX_LS_MAP|
|1 |CS_OPER_AUX_ODLE___00000000T000000_99999999T999999_0002.DBL|AUX_ODLE__|
+----+-----------------------------------------------------------+----------+
Command executed in 3ms

select name, type, start from Product limit 2

+----+-----------------------------------------------------------+----------------------+----------+
|# |name |start |type |
+----+-----------------------------------------------------------+----------------------+----------+
|0 |CS_OPER_AUX_LS_MAP_00000000T000000_99999999T999999_0002.DBL|19000101_000000.000000|AUX_LS_MAP|
|1 |CS_OPER_AUX_ODLE___00000000T000000_99999999T999999_0002.DBL|19000101_000000.000000|AUX_ODLE__|
+----+-----------------------------------------------------------+----------------------+----------+
Command executed in 2ms

select name, type, start, stop from Product limit 2

+----+----------------------+-----------------------------------------------------------+----------------------+----------+
|# |stop |name |start |type |
+----+----------------------+-----------------------------------------------------------+----------------------+----------+
|0 |99991231_235959.000000|CS_OPER_AUX_LS_MAP_00000000T000000_99999999T999999_0002.DBL|19000101_000000.000000|AUX_LS_MAP|
|1 |99991231_235959.000000|CS_OPER_AUX_ODLE___00000000T000000_99999999T999999_0002.DBL|19000101_000000.000000|AUX_ODLE__|
+----+----------------------+-----------------------------------------------------------+----------------------+----------+
Command executed in 2ms

select from Product limit 2

+----+----+-------+----------------------+-----------------------------------------------------------+----------------------+----------+
|# |@Rid|@type |stop |name |start |type |
+----+----+-------+----------------------+-----------------------------------------------------------+----------------------+----------+
|0 |#4:0|Product|99991231_235959.000000|CS_OPER_AUX_LS_MAP_00000000T000000_99999999T999999_0002.DBL|19000101_000000.000000|AUX_LS_MAP|
|1 |#4:1|Product|99991231_235959.000000|CS_OPER_AUX_ODLE___00000000T000000_99999999T999999_0002.DBL|19000101_000000.000000|AUX_ODLE__|
+----+----+-------+----------------------+-----------------------------------------------------------+----------------------+----------+
Command executed in 2ms

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions