Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-12106

Support ARRAY type in BeamJavaUdfCalcRule.

Details

    Description

      There are at least a couple reasons why this doesn't work yet:

      1. Type inference. Returning a List seems to work okay because we preserve the return element type [1], but taking a List as an input doesn't work because we lose the parameters' element type(s) [2].
      2. The current matching logic rejects the Calcite ARRAY operator. We can probably make it less strict. [3]

       [1] https://github.com/apache/beam/blob/ffb00911b5d5579544fc4c699f186dd3e1cd2b83/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/ScalarFunctionImpl.java#L129

      [2] https://github.com/apache/beam/blob/0c01636fc8610414859d946cb93eabc904123fc8/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/UdfImplReflectiveFunctionBase.java#L61

      [3] https://github.com/apache/beam/blob/315386cdfec6803b95f0b881d699e674f63d48ad/sdks/java/extensions/sql/zetasql/src/main/java/org/apache/beam/sdk/extensions/sql/zetasql/BeamJavaUdfCalcRule.java#L88-L89

      Attachments

        Issue Links

          Activity

            People

              ibzib Kyle Weaver
              ibzib Kyle Weaver
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m