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

Feature request 20230322 #2

Closed
writinwaters opened this issue Mar 22, 2023 · 5 comments
Closed

Feature request 20230322 #2

writinwaters opened this issue Mar 22, 2023 · 5 comments
Assignees
Labels
feature request New feature or request

Comments

@writinwaters
Copy link
Contributor

writinwaters commented Mar 22, 2023

CREATE TABLE mytable (
   id INTEGER PRIMARY KEY,
   name VARCHAR(50),
   age INTEGER
 );
 INSERT INTO mytable (id, name, age) VALUES (1, 'John', 30);
 INSERT INTO mytable (id, name, age) VALUES (2, 'Jane', 25);
@writinwaters writinwaters added the feature request New feature or request label Mar 22, 2023
@writinwaters writinwaters changed the title DELETE is not supported yet. Feature request 20230322 Mar 22, 2023
@writinwaters
Copy link
Contributor Author

DELETE is not supported

DELETE FROM mytable WHERE age<26

Inserting select isn't supported @src/planner/logical_planner.cpp:218

CREATE TABLE a (
       id INTEGER PRIMARY KEY
      name VARCHAR(50),
      age INTEGER
);
INSERT INTO a (id, name, age) VALUES (1, 'tom', 32);
 INSERT INTO mytable SELECT * FROM a;

@writinwaters
Copy link
Contributor Author

Sorting command creates unnecessary project name

SELECT * FROM mytable ORDER by age ASC;

 project4.mytable.id | project4.mytable.name | project4.mytable.age
---------------------+-----------------------+----------------------
                   2 | Jane                  |                   25
                   1 | John                  |                   30
(2 rows)

@writinwaters
Copy link
Contributor Author

Inserting into a specific column is not supported

INSERT INTO mytable(name) VALUES ('Johnson'), ('Johnston');

Error message
Parser Error: syntax error, unexpected ',', expecting end of file, 44 @src/main/query_context.cpp:79

@JinHai-CN
Copy link
Contributor

Sorting command creates unnecessary project name

SELECT * FROM mytable ORDER by age ASC;

 project4.mytable.id | project4.mytable.name | project4.mytable.age
---------------------+-----------------------+----------------------
                   2 | Jane                  |                   25
                   1 | John                  |                   30
(2 rows)

Fixed in https://github.com/infiniflow/infinity/commit/4631dd329ae52f11a6b55604cb119de6f9177bb5

@JinHai-CN
Copy link
Contributor

Inserting into a specific column is not supported

INSERT INTO mytable(name) VALUES ('Johnson'), ('Johnston');

Error message Parser Error: syntax error, unexpected ',', expecting end of file, 44 @src/main/query_context.cpp:79

Multiple values in value list isn't supported.

JinHai-CN added a commit that referenced this issue Jun 16, 2024
### What problem does this PR solve?

```
=================================================================
==58327==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 576 byte(s) in 24 object(s) allocated from:
    #0 0x55be02292f41 in operator new(unsigned long) (/infinity/cmake-build-debug/src/infinity+0x707f41) (BuildId: a8a47e2552e9916f1f7d2b289e095233935d70f4)
    #1 0x55be051ac8d0 in sqlparse(void*, infinity::ParserResult*) /infinity/cmake-build-debug/parser.y:2942:39
    #2 0x55be050f73b8 in infinity::SQLParser::Parse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, infinity::ParserResult*) /infinity/src/parser/sql_parser.cpp:39:9
    #3 0x55be02a13141 in infinity::QueryContext@query_context::Query(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) /infinity/src/main/query_context.cpp:90:14
    #4 0x55be02454cbb in infinity::Connection@connection::HandlerSimpleQuery(infinity::QueryContext@query_context*) /infinity/src/network/connection.cpp:155:41
    #5 0x55be024541b3 in infinity::Connection@connection::HandleRequest() /infinity/src/network/connection.cpp:131:13
    #6 0x55be0245219b in infinity::Connection@connection::Run() /infinity/src/network/connection.cpp:70:13
    #7 0x55be0284b0ac in infinity::PGServer@pg_server::StartConnection(std::shared_ptr<infinity::Connection@connection>&)::$_0::operator()() /infinity/src/network/pg_server.cpp:81:25
    #8 0x55be0284b004 in void std::__invoke_impl<void, infinity::PGServer@pg_server::StartConnection(std::shared_ptr<infinity::Connection@connection>&)::$_0>(std::__invoke_other, infinity::PGServer@pg_server::StartConnection(std::shared_ptr<infinity::Connection@connection>&)::$_0&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/invoke.h:61:14
    #9 0x55be0284afc4 in std::__invoke_result<infinity::PGServer@pg_server::StartConnection(std::shared_ptr<infinity::Connection@connection>&)::$_0>::type std::__invoke<infinity::PGServer@pg_server::StartConnection(std::shared_ptr<infinity::Connection@connection>&)::$_0>(infinity::PGServer@pg_server::StartConnection(std::shared_ptr<infinity::Connection@connection>&)::$_0&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/invoke.h:96:14
    #10 0x55be0284af9c in void std::thread::_Invoker<std::tuple<infinity::PGServer@pg_server::StartConnection(std::shared_ptr<infinity::Connection@connection>&)::$_0>>::_M_invoke<0ul>(std::_Index_tuple<0ul>) /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/std_thread.h:292:13
    #11 0x55be0284af74 in std::thread::_Invoker<std::tuple<infinity::PGServer@pg_server::StartConnection(std::shared_ptr<infinity::Connection@connection>&)::$_0>>::operator()() /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/std_thread.h:299:11
    #12 0x55be0284ade8 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<infinity::PGServer@pg_server::StartConnection(std::shared_ptr<infinity::Connection@connection>&)::$_0>>>::_M_run() /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/std_thread.h:244:13
    #13 0x55be05869602 in execute_native_thread_routine thread.o
```

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants