resolves #1102 : add full primary key support to clickhouse DBMS#1131
resolves #1102 : add full primary key support to clickhouse DBMS#1131abdala-elgendy wants to merge 45 commits into
Conversation
…,getPositiveIntegerNotNull,getNonCachedInteger)
This reverts commit 0edca28.
This reverts commit 96065ad.
This reverts commit a9d48a5.
This reverts commit 7ae7bf4.
…icChar)" This reverts commit 5bfced6.
…gDecimal,getPositiveIntegerNotNull,getNonCachedInteger)" This reverts commit d46dcae.
…getBigInteger)" This reverts commit 46a7360.
…tLeast" This reverts commit 1e11db9.
…nonEmptySubset" This reverts commit fda6bd3.
…instead of the TLPWhereOracle
|
I am sorry about the unrelated log commits but all the changes related to adding a primary key to clickhouse @mrigger |
|
Now clickhouse support primary keys could you check dr @qoega |
| import sqlancer.clickhouse.ClickHouseProvider.ClickHouseGlobalState; | ||
| import sqlancer.clickhouse.ClickHouseVisitor; | ||
|
|
||
| public class ClickHouseTLPWhereOracle extends ClickHouseTLPBase { |
There was a problem hiding this comment.
Why do we need a separate ClickHouse oracle class? @malwaregarry recently eliminated redundancies. Also, how does this relate to the primary key constraints?
There was a problem hiding this comment.
how does this relate to the primary key constraints?
No, (clickhouseTLPBase )
handles already all pk constraints I have put in clickhouseTableGenerator
I can delete it with no conflicts in any constraints
There was a problem hiding this comment.
I'm not sure if I understand your response. It seems the change is not related to the primary key support? Please only open PRs that have a common objective.
There was a problem hiding this comment.
There was a problem hiding this comment.
Could you perhaps explain why the test oracles fail without the change based on a minimal SQL example? There seems to be a deeper issue here.
There was a problem hiding this comment.
sorry I have seen this comment now dr @mrigger!
after I added pk support the ClickHouse's join behavior changed and without join_use_nulls=1 , NULL handling in joins become inconsistent

There seems to be a deeper issue here.
there isn't a deeper issue it is just configuring these settings appropriately, you can achieve more constant query results in Clickhouse.

| CERTOracle.CheckedFunction<SQLancerResultSet, Optional<Long>> rowCountParser = (rs) -> { | ||
| String content = rs.getString(2); | ||
| return Optional.of((long) Double.parseDouble(content)); | ||
| try { |
There was a problem hiding this comment.
Please ensure to not include unrelated changes.
| return values; | ||
| } | ||
|
|
||
| @Test |
There was a problem hiding this comment.
This seems unrelated to ClickHouse.

resolves #1102

after I traverse the clickhouse and know the flow of creating I see it will be helpful to to add pk to columns
there is only one problem I can't handle well testClickHouseNoREC to deal with NULL values and primary key properly how can I do that dr @qoega could you take a look in the code and this error
I handle it in TLP but I can't handle it in NoREC