compatlib_function - ConnectBy supports VARCHAR inputs#70
compatlib_function - ConnectBy supports VARCHAR inputs#70h-serizawa wants to merge 4 commits intovertica:masterfrom
Conversation
|
[Test Data] [Test Result with INTEGER inputs] [Test Result with VARCHAR inputs] |
|
Thank you! I have one reservation. You give two factories: ConnectByIntFactory and ConnectByVarcharFactory to provide two interfaces to the same function (by reading ints as strings). This means that someone using ints will pay a conversion price to strings. In addition, all the map operations will be done on string keys and not int keys, which I suspect is less efficient. If one's tables are small, this is probably not such a big concern, but Vertica is used with tables that have billions of rows. Given that many (possibly most) uses of this function will be using integer keys from a dimension table, I think it might be better to have separate ConnectByInt and ConnectByVarchar implementations which only do conversions when needed. I wonder if you could implement a template that does the algorithmic work in processPartition to avoid duplication? Does that seem reasonable to you? |
|
@dmankins Thank you for your valuable feedback! Yes, the data conversion from int to string will be a performance concern. I removed the conversion using the template. Can you review this request again? |
Currently, ConnectBy supports INTEGER inputs as parent ID and child ID. Now, it supports VARCHAR inputs as well. Close #69.