Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-5276

Implicitly convert strings to geometries

    XMLWordPrintableJSON

Details

    Description

      Postgis and H2GIS implicitly transform strings into a geometries so that one can write the following query:

      SELECT ST_AsText('POINT(-71.064544 42.28787)');

      Instead of:

      SELECT ST_AsText(ST_GeomFromText('POINT(-71.064544 42.28787)'));

       supports this kind of conversion. Should I introduce a new SqlTypeTranform (TO_GEOMETRY)? Thanks a lot for your help, I'm still discovering the internals of calcite. 

      The idea would be to introduce a SqlTypeTransform, change the SqlTypeAssignmentRule (see CALCITE-3550), add tests in TypeCoercionTest, and update the doc. 

      Attachments

        Issue Links

          Activity

            People

              bchapuis Bertil Chapuis
              bchapuis Bertil Chapuis
              Votes:
              0 Vote for this issue
              Watchers:
              3 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 - 10m
                  10m