Jiefan Li

Results 11 issues of Jiefan Li

This PR is for #235. `DaliOperatorTable` registers legal operators for Calcite to validate and convert the input SqlNode. Given we convert other types of operators (like Trino operators) to Hive...

This PR is to make Coral-Schema compatible with both Avro 1.7 and Avro 1.10. Main changes: 1. Use `AvroCompatibilityHelper` to create schema field, get default value, parse schema and add...

Design Doc: [Spark View Catalog with Coral & HMS](https://docs.google.com/document/d/1BEnW-svnxxexTnad1mOcbi5wX_omODEUv7SThY9NY04/edit?usp=sharing) This PR is mostly based on the [upstream Spark view catalog PR](https://github.com/apache/spark/pull/35636) with some modifications on that PR: 1. Used `CatalogAndIdentifier`...

I encountered the following exception while querying a simple view `SELECT 1 intCol` on Spark shell: ``` Caused by: java.lang.NullPointerException at com.linkedin.coral.schema.avro.RelToAvroSchemaConverter$SchemaRelShuttle.visit(RelToAvroSchemaConverter.java:224) at coral_dali.org.apache.calcite.rel.logical.LogicalProject.accept(LogicalProject.java:121) at com.linkedin.coral.schema.avro.RelToAvroSchemaConverter.convert(RelToAvroSchemaConverter.java:127) at com.linkedin.coral.schema.avro.ViewToAvroSchemaConverter.inferAvroSchema(ViewToAvroSchemaConverter.java:199) at com.linkedin.coral.schema.avro.ViewToAvroSchemaConverter.toAvroSchema(ViewToAvroSchemaConverter.java:102)...

### What changes are proposed in this pull request, and why are they necessary? In Hive, `CURRENT_TIMESTAMP` returns a `UTC` timestamp, whereas in Trino, it returns a timestamp based on...

Current [SqlCallTransformer.getRelDataType(SqlNode)](https://github.com/linkedin/coral/blob/master/coral-common/src/main/java/com/linkedin/coral/common/transformers/SqlCallTransformer.java#L83) assumes that the parent SqlSelect is visited before determining the datatype of the child SqlNode, which is typically achieved by traversing the SqlNode tree using SqlShuttle. Ideally, its...

CoralIR

Current [SqlCallTransformer](https://github.com/linkedin/coral/blob/master/coral-common/src/main/java/com/linkedin/coral/common/transformers/SqlCallTransformer.java#L22) transforms `SqlCall`, we need to investigate if transforming `SqlBasicCall` meets our requirement of migrating transformations from RelNode layer to SqlNode layer.

CoralIR

In PR #368, we added [override on public Result visit(Values e)](https://github.com/linkedin/coral/pull/368/files#diff-c5c8865e887e815b03a63a0de8fe443d3e7eb0b0a913e9920255e9dc55888995R380) to avoid duplicated alias `t`. But this override is only needed with linkedin-calcite, and apache-calcite won't bring the duplicated...

Currently, if we union the following 2 fields: ``` type: int, default: 1 ``` and ``` type: [null, int], default: null ``` the returned field is: ``` type: [int, null],...

### What changes are proposed in this pull request, and why are they necessary? Empty commit to trigger build ### How was this patch tested? NA