-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix AddTable for realtime tables #9506
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good. have one quick question
TableType tableType = TableNameBuilder.getTableTypeFromTableName(tableConfig.getTableName()); | ||
if (tableType == TableType.OFFLINE) { | ||
offlineTableConfig = tableConfig; | ||
} else { | ||
realtimeTableConfig = tableConfig; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so the table is default to REALTIME if no type is extracted out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we enforce this and throw if table type is unknown?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually realized that we can just get tableType directly from config, no extraction needed. updated
Codecov Report
@@ Coverage Diff @@
## master #9506 +/- ##
==========================================
Coverage 69.98% 69.99%
- Complexity 4869 5199 +330
==========================================
Files 1921 1921
Lines 102356 102356
Branches 15532 15532
==========================================
+ Hits 71636 71646 +10
+ Misses 25658 25648 -10
Partials 5062 5062
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@npawar can you just add a note on what the bug was? We pull from the master, so we may have pulled the buggy version. It will be useful to know so we can warn our users (or expect some strange behavior). thanks |
done |
* Fix AddTable for realtime tables * Type
Fixing a bug happened as a side effect of #9228
Due to the bug, we lost the ability to add realtime tables using AddTable. The logic was changed to use the tableConfigs API, and it assumed that config will always be offline. An oss user stumbled upon this after upgrading to 0.11 https://apache-pinot.slack.com/archives/C011C9JHN7R/p1664525974774459
After the fix, we will be able to provide both table configs to the command using
-realtimeTableConfigFile
and-offlineTableConfigFile
, and if you only provide-tableConfigFile
, the right tableType will be extracted from the table config.