Create simple catalog takes a long time
- Dominant language
- C++
- Stars
- 2.6k
- Forks
- 260
- PR merge metrics
- No merged PRs in 30d
Description
Hi, sorry for asking here. I am using zetasql in my Java Springboot application. When I hit my endpoint that is integrated to zetasql, the duration time is very slow. I checked using newrelic and found that this function need about 9-10s to complete. It affects my endpoint duration time, so I want to optimize it. But, I have any idea how to optimize it. Could anyone please help ?
Thank you.
```
public static SimpleCatalog createEmptyCatalog() {
SimpleCatalog catalog = new SimpleCatalog("catalog");
// Add built-in functions
catalog.addZetaSQLFunctions(new ZetaSQLBuiltinFunctionOptions());
// Add BigQuery-specific type aliases
catalog.addType("INT", TypeFactory.createSimpleType(ZetaSQLType.TypeKind.TYPE_INT64));
catalog.addType("SMALLINT", TypeFactory.createSimpleType(ZetaSQLType.TypeKind.TYPE_INT64));
catalog.addType("INTEGER", TypeFactory.createSimpleType(ZetaSQLType.TypeKind.TYPE_INT64));
catalog.addType("BIGINT", TypeFactory.createSimpleType(ZetaSQLType.TypeKind.TYPE_INT64));
catalog.addType("TINYINT", TypeFactory.createSimpleType(ZetaSQLType.TypeKind.TYPE_INT64));
catalog.addType("BYTEINT", TypeFactory.createSimpleType(ZetaSQLType.TypeKind.TYPE_INT64));
catalog.addType("DECIMAL", TypeFactory.createSimpleType(ZetaSQLType.TypeKind.TYPE_NUMERIC));
catalog.addType(
"BIGDECIMAL", TypeFactory.createSimpleType(ZetaSQLType.TypeKind.TYPE_BIGNUMERIC));
return catalog;
}
```
Contributor guide
Assessment
This issue has not been assessed yet.