Home < Blog < Improving SQL Execution – An Intern’s Story

Improving SQL Execution – An Intern’s Story

5 min read

My name is Dinesh Majeti and I am a Ph.D. student from the University of Houston in the field of Computer Science. It is an exciting moment when you start to work in the industry for the first time, especially as a graduate student who worked on a research problem in the lab for a few years. Curious and enthusiastic about the cultural difference between the industry and the academia, this summer, I got the opportunity to work at Volt Active Data. Volt Active Data is an in-memory transactional database for modern applications that need to manage data at very large scale and volume, with 100% accuracy. I worked in the SQL team which deals with parsing, planning, and executing the SQL queries.

SQL Team Experience

Initially, I worked on improving the FILE directive to process multiple DDL files as one single batch. Previously, Volt Active Data would only allow one DDL file per batch. Because of this, the users needed to have a very long file which is hard to maintain and logically organize for batch processing. Furthermore, the previous method of processing this FILE directive was recursive in nature. Extending this functionality is an interesting problem to work on involving parsing and processing in the front-end Java client.

Another major task I worked on was to add support for the unary minus operator in SQL queries for Volt Active Data, which also included the back-end consisting of the execution engine where the planned queries are executed. I also worked a little bit on materialized views. The previous support for materialized views in Volt Active Data is very rigid in syntax and I worked on making it more flexible. The product currently has the front-end in Java and the back-end in C++. These tasks had to ensure that the data is correctly read in memory in these languages.

Volt Active Data has extensive testing for all the code. The tests range from unit tests of simple functions to system tests and overall regression testing of whole features. They gave a flavor of testing in different languages with a cluster of continuous integration servers (Jenkins). They also re-emphasized in me the value of testing when code I wrote caused a few tests to fail. This made me look at how my code is used by different parts of the whole system and how it affects the product. Also, members of the engineering team demo the features as we complete them. This helped me develop the art of delivering technical demos.

Innovation Week

The company also had an innovation week in the last week of June where engineers can work on self-driven projects other than their daily tasks. At the end of the week, we deliver a presentation to the entire company including people from the marketing and the sales teams. This is a great opportunity to be creative and to learn how to give a presentation to non-technical people. I worked on multi-statement stored procedures for the innovation week. Previously, multi-statement procedures were only possible with Java classes. With this work, users can create them using Volt Active Data SQL syntax if no complex logic is required between the SQL statements, thus saving users the trouble of creating, compiling, and loading Java classes.

After the demo, the team decided to integrate this feature into the product. This was quite challenging because I had to deal with the parser and the new syntax for creating multi-statement procedures. Furthermore, Volt Active Data has multiple clients which had different parsers. There is a Java client, a command line client, and a web client. Since Volt Active Data did not support using multiple SQL statements to define a stored procedure except in Java classes so far, these parsers would look for a semicolon to determine the end of a statement. It was a challenging problem which dealt with testing and parsing in different languages like Java and Javascript. I refactored a lot of code in this process.

The code I helped write was shipped after it was reviewed and approved. All of these features were released in versions 7.4-7.7. It is very exciting as interns to have our code ship as part of the product. It helps me write efficient code with much better software development practices and improve my communication and presentation skills. The people here are very friendly and I really love my team! The code reviews were a mixture of technical discussions and light-hearted humor from some teammates (a skill I tried to pick up myself).

Intern #LifeAtVolt Active Data

The other interns were great and we had interesting discussions, technical and non-technical. We used to have daily intern snack sessions, ping pong tournaments along with weekly team lunches. I got lots of care and attention from my mentor even before I arrived at Volt Active Data, starting from when I initially got my offer. I received a lot of assistance for accommodation and other things not directly related to my work which made my stay in Boston comfortable. Overall, it has been a very rewarding and fantastic experience to work at Volt Active Data not just because of the insights into database development but also due to the people, their care, and support.