Skip to content

Commit

Permalink
Revert "[Enhancement] Change Sort Key Order for AirByte tables" (Star…
Browse files Browse the repository at this point in the history
…Rocks#25802)

## Description

StarRocks#25026 introduced a bug which
I mentioned here -
StarRocks#25026 (comment)

For now, I'm reverting the change.

Basically during data load to StarRocks, we end up inserting
_airbyte_emitted_at value into _airbyte_ab_id and vice-versa.

## What type of PR is this:
- [x] BugFix
- [ ] Feature
- [ ] Enhancement
- [ ] Refactor
- [ ] UT
- [ ] Doc
- [ ] Tool

Signed-off-by: Ashish Bansal <[email protected]>
  • Loading branch information
Ashish-Bansal authored Jun 25, 2023
1 parent dd51979 commit 4262e45
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ public static void renameTable(Connection conn, String srcTableName, String dstT

public static void createTableIfNotExist(Connection conn, String tableName) throws SQLException {
String sql = "CREATE TABLE IF NOT EXISTS " + tableName + " ( \n"
+ "`" + JavaBaseConstants.COLUMN_NAME_EMITTED_AT + "` BIGINT,\n"
+ "`" + JavaBaseConstants.COLUMN_NAME_AB_ID + "` varchar(40),\n"
+ "`" + JavaBaseConstants.COLUMN_NAME_EMITTED_AT + "` BIGINT,\n"
+ "`" + JavaBaseConstants.COLUMN_NAME_DATA + "` String)\n"
+ "DUPLICATE KEY(`" + JavaBaseConstants.COLUMN_NAME_EMITTED_AT + "`,`"
+ JavaBaseConstants.COLUMN_NAME_AB_ID + "`) \n"
+ "DUPLICATE KEY(`" + JavaBaseConstants.COLUMN_NAME_AB_ID + "`,`"
+ JavaBaseConstants.COLUMN_NAME_EMITTED_AT + "`) \n"
+ "DISTRIBUTED BY HASH(`" + JavaBaseConstants.COLUMN_NAME_AB_ID + "`) BUCKETS 16 \n"
+ "PROPERTIES ( \n"
+ "\"replication_num\" = \"1\" \n"
Expand Down

0 comments on commit 4262e45

Please sign in to comment.