Skip to content

Conversation

@yutannihilation
Copy link
Contributor

After #275 and #449, ST_GeomFromText and ST_Point accepts SRID as the last argument. So, in theory, we can replace the following ST_SetSrid() usages.

  • ST_SetSrid(ST_GeomFromText('wkt'), srid) -> ST_GeomFromText('wkt', srid)
  • ST_SetSrid(ST_Point(x, y), srid) -> ST_Point(x, y, srid)

Copy link
Member

@paleolimbot paleolimbot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The R failures are very strange:

══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-dataframe.R:250:3'): sd_write_parquet can write geometry data ──
Error: Error: Execution error: FFI error: This feature is not implemented: st_point([Arrow(Int64), Arrow(Int64), Arrow(Int64)]): No kernel matching arguments
Backtrace:
    ▆
 1. └─sedonadb::sd_write_parquet(df, tmp_parquet_file) at test-dataframe.R:250:3
 2.   └─.data$df$to_parquet(...) at sedonadb/R/dataframe.R:262:3
── Error ('test-dataframe.R:270:3'): sd_write_parquet validates geoparquet_version parameter ──
Error: Error: Execution error: FFI error: This feature is not implemented: st_point([Arrow(Int64), Arrow(Int64), Arrow(Int64)]): No kernel matching arguments
Backtrace:
    ▆
 1. └─sedonadb::sd_write_parquet(df, tmp_parquet_file, geoparquet_version = "1.0") at test-dataframe.R:270:3
 2.   └─.data$df$to_parquet(...) at sedonadb/R/dataframe.R:262:3
── Failure ('test-lint.R:20:3'): package is lint-free ──────────────────────────
Not lint free
tests/testthat/_problems/test-dataframe-250.R:10:4: style: [indentation_linter] Indentation should be 2 spaces but is 4 spaces.
    "SELECT ST_Point(1, 2, 4326) as geom, 'test' as name"
  ~^

tests/testthat/_problems/test-dataframe-270.R:10:4: style: [indentation_linter] Indentation should be 2 spaces but is 4 spaces.
    "SELECT ST_Point(1, 2, 4326) as geom, 'test' as name"
  ~^


[ FAIL 3 | WARN 0 | SKIP 0 | PASS 81 ]

On my local checkout all the tests pass if I step through the file, but if I run with devtools::test() I get the two failures and I can't get the lintr test to fail locally. I'll try to circle back to this at some point today.

@paleolimbot
Copy link
Member

I think I found the first one, which is apache/datafusion#18201. This will be resolved when we update to DataFusion 52 (which will happen some time after we release SedonaDB 0.3). If the lintr error is still here I (or you) can add skip_on_ci() to the lintr test or nolint start: indentation_linter / nolint end around the offending lines.

@yutannihilation
Copy link
Contributor Author

Oh, thanks so much for investigating and fixing! I was stuck as I had no idea what was happening here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants